My numbers, and an additional version. As I use linux, my xml file is<br>a 1606348 bytes rhythmbox.xml:<br><br><br>threaded: 8.39, 8.44, 8.05<br>(my)threaded: 1.53, 1.53. 1.54<br>stackless: 1.07, 0.94. 0.97
<br>SAX interface: 0.28, 0.27, 0.29<br>
<br>
My version substitutes the bloated and hyperlocked Queue class by a<br>deque + simple locking, using with for cleaner code.<br><br>To test using 2.4,<br><br>with lock:<br> <code><br><br>can be substituted by:<br><br>
try:<br> lock.acquire()<br> <code><br>finally:<br> lock.release()<br><br>A substantial part of the overhead, thus, is due to the Queue class, though<br>stackless is still 50%+ faster than a simple deque+lock solution, plus cleaner code
<br><br><div><span class="gmail_quote">On 1/27/07, <b class="gmail_sendername">Andrew Dalke</b> <<a href="mailto:dalke@dalkescientific.com">dalke@dalkescientific.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Jan 27, 2007, at 5:35 AM, Taylor Boon wrote:<br>> Here are some more numbers:<br>><br>> threaded version: 72.5s, 73.6s, 73.5s<br>> stackless version: 8.0s, 8.0s, 7.9s<br>> low-level SAX interface: 3.8s,
3.2s, 3.2s<br>><br>> The file I used was also my iTunes library: 10,547,041 bytes with<br>> 381822<br>> calls to startElement.<br>><br>> These numbers were generated in Windows XP Pro SP2 on an AMD Athlon 64
<br>> x2<br>> 4200+ with Python 2.5 Stackless 3.1b3.<br><br>Thanks!<br><br>> I had to run the<br>> threaded and stackless tests a couple of more times just to verify<br>> that the<br>> difference is almost an order of magnitude.
<br><br>I'm glad to know that I'm not the only one who was suspicious<br>about the difference. :)<br><br> Andrew<br> <a href="mailto:dalke@dalkescientific.com">
dalke@dalkescientific.com</a><br><br><br>_______________________________________________<br>Stackless mailing list<br><a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br><a href="http://www.stackless.com/mailman/listinfo/stackless">
http://www.stackless.com/mailman/listinfo/stackless</a><br></blockquote></div><br>