Stackless: 1,000,000 Switches in 0.6 seconds

Christian Tismer tismer at
Fri Feb 22 16:14:46 CET 2002

Sorry, I can't hold it back.

Not only that tasklets are smaller than expected, they
are also really fast.

I was stunned when I measured switching speed on an AMD Athlon XP 1500+
machine. A python script switched tasklets 1,000,000 times. The usual
Python call overhead was included. I measured this without switching and
got about 0.3 seconds. That means: Context switching by an automated,
internal scheduler without the interpreter overhead comes at the same
cost as a Python function call.

The website has been updated again.
Christian Tismer             :^)   <mailto:tismer at>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship*
14163 Berlin                 :     PGP key ->
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
       where do you want to jump today?

More information about the Python-list mailing list