Python threading (was: Re: global interpreter lock not working as it should)

Martin v. Loewis martin at v.loewis.de
Thu Aug 8 03:19:26 EDT 2002


bokr at oz.net (Bengt Richter) writes:

> If you're talking about the compute-bound situation, as we have been,
> yes, but typically all is not computation. I don't expect you mean that
> in general multithreading always slows down a *system* ;-)

Compared to what? A single-threaded solution? I do think that
multi-threading creates a higher CPU load, and if you manage not to
block in system calls when there is work to and, and to avoid
busy-waits, that a single-threaded application will have higher
performance than a equivalent multi-threaded one.

Threads are for convenience, not for performance.

Regards,
Martin



More information about the Python-list mailing list