Python Performance vs. C++ in a Complex System

Aahz Maruch aahz at panix.com
Sun Apr 15 18:31:46 EDT 2001


In article <yTnC6.671587$JT5.17930511 at news20.bellglobal.com>,
Elliott Chapin <echapin at sympatico.ca> wrote:
>
>So how does Python do context switching, [anybody]?

It depends on whether you use native Python threads or microthreads
built on top of Stackless Python.  Python threads are built on top of
OS-level threads, so the OS handles the context switch.  Microthreads
are built on top of continuations in Stackless, and an essentially
cooperative multi-tasker handles the context switches.
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list