future multi-threading for-loops

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Feb 5 01:26:55 EST 2008


On 5 feb, 03:46, castiro... at gmail.com wrote:

> Some timing stats: On Windows XP, Python 3.0a2.
>
> [timing code, 10,000 calls]
> [ f( X ) ]: 0.0210021106034
> [ start_new_thread( f, X ) ]: 1.15759908033
> [ Thread( f, X ).start() ]: 1.85400099733
> [ Thread( f, X ).start and .join() ]: 1.93716743329
>
> Are threads an OS bottleneck?

I don't understand your threading issues, but I would not use 3.0a2
for benchmarking anything (except benchmarking Python 3.0 itself).
AFAIK the developers are first trying to get it right and stable;
speed issues will be addressed later.

--
Gabriel Genellina



More information about the Python-list mailing list