Python Thread Question
Erno Kuusela
erno-news at erno.iki.fi
Fri Apr 18 20:31:52 EDT 2003
In article <mailman.1050587609.6119.python-list at python.org>, Jp
Calderone <exarkun at intarweb.us> writes:
| Nope. Threading costs you context switches. A multi-threaded app using
| blocking IO will appear "faster" than a single-thread app doing the same,
| but both take longer to run than a single written app using non-blocking IO.
in addition, enabling threading (creating the first theread) turns on
all the locking machinery in the python interpreter. this causes
everything to slow down somewhat. on my pc, running pystone in
a thread goes about 50% slower than normally.
-- erno
More information about the Python-list
mailing list