[Stackless] Functions vs. Classes

Christian Tismer tismer at tismer.com
Sat Mar 29 18:16:31 CET 2003

Jordan McCoy wrote:
> Greetings all.
> First off, pretty glad I found stackless, it's exactly what I need for some
> of the work I'm doing. I do have a question though, and thought I would ask
> this list before concocting a test.
> I have an interest in replacing the function usually given a tasklet with a
> callable object; thus each tasklet would be running an actual class object
> rather then a function. I know there will be a performance hit due to the
> class overhead, but I need to know how much of a hit it would be. Has anyone
> tried this before, and produced hard numbers? Any general thoughts?

That depends on how often you are creating tasklets.
It is only the startup overhead. Later on, your tasklet
runs at the same speed as everything else, the task
switching time is not dependent from that.
On the other hand, if you are creating very short
running tasklets all the time for just a few instructions,
the overhead might become more visible. But I wouldn't
care, this is *all* very fast stuff.

cheers - chris

Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list