multiprocessing vs thread performance

Gabriel Genellina gagsl-py2 at
Tue Jan 6 04:24:14 CET 2009

En Sat, 03 Jan 2009 11:31:12 -0200, Nick Craig-Wood <nick at>  
> mk <mrkafk at> wrote:

>>  The results I got are very different from the benchmark quoted in PEP
>>  371. On twin Xeon machine the threaded version executed in 5.54 secs,
>>  while multiprocessing version took over 222 secs to complete!
>>  Am I doing smth wrong in code below?
> Yes!
> The problem with your code is that you never start more than one
> process at once in the multiprocessing example.  Just check ps when it
> is running and you will see.

Oh, very good analysis! Those results were worriying me a little.

Gabriel Genellina

More information about the Python-list mailing list