Parallelization on muli-CPU hardware?

Nicolas Lehuen nicolas.lehuen at thecrmcompany.com
Tue Oct 12 15:08:46 CEST 2004


"Richie Hindle" <richie at entrian.com> a écrit dans le message de news:mailman.4742.1097573758.5135.python-list at python.org...
> 
> [Nicolas, arguing for a free-threading Python]
> > compare IO intensive (especially network IO) programs, the multi-threaded
> > program wins.
> 
> The GIL is released during network IO.  Multithreaded network-bound
> Python programs can take full advantage of multiple CPUs already.
> 
> (You may already know this and I'm missing a point somewhere, but it's
> worth repeating for the benefit of those that don't know.)

Yeah I know this. My point was that when benchmarking single-threaded programs vs multithreaded ones, you have to choose the kind of program you use : CPU-intensive vs IO-intensive. On a single CPU machine, CPU-intensive program will always run better in a single-threaded model. But of course, if you have 2 procs and a nice threading model, you can even do 2 CPU-intensive tasks simultaneously, which Python cannot do if I've understood everything so far.

Regards,

Nicolas



More information about the Python-list mailing list