[Stackless] verify my performance numbers?

Santiago Gala sgala at apache.org
Mon Jan 29 01:13:37 CET 2007


My numbers, and an additional version. As I use linux, my xml file is
a 1606348 bytes rhythmbox.xml:


threaded:          8.39, 8.44, 8.05
(my)threaded:   1.53, 1.53. 1.54
stackless:        1.07, 0.94. 0.97
SAX interface:   0.28, 0.27, 0.29

My version substitutes the bloated and hyperlocked Queue class by a
deque + simple locking, using with for cleaner code.

To test using 2.4,

with lock:
  <code>

can be substituted by:

try:
  lock.acquire()
  <code>
finally:
  lock.release()

A substantial part of the overhead, thus, is due to the Queue class, though
stackless is still 50%+ faster than a simple deque+lock solution, plus
cleaner code

On 1/27/07, Andrew Dalke <dalke at dalkescientific.com> wrote:
>
> On Jan 27, 2007, at 5:35 AM, Taylor Boon wrote:
> > Here are some more numbers:
> >
> > threaded version: 72.5s, 73.6s, 73.5s
> > stackless version: 8.0s, 8.0s, 7.9s
> > low-level SAX interface: 3.8s, 3.2s, 3.2s
> >
> > The file I used was also my iTunes library: 10,547,041 bytes with
> > 381822
> > calls to startElement.
> >
> > These numbers were generated in Windows XP Pro SP2 on an AMD Athlon 64
> > x2
> > 4200+ with Python 2.5 Stackless 3.1b3.
>
> Thanks!
>
> > I had to run the
> > threaded and stackless tests a couple of more times just to verify
> > that the
> > difference is almost an order of magnitude.
>
> I'm glad to know that I'm not the only one who was suspicious
> about the difference.  :)
>
>                                         Andrew
>                                         dalke at dalkescientific.com
>
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070129/5be81aa2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itersax_mythreads.py
Type: text/x-python
Size: 1880 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070129/5be81aa2/attachment.py>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list