Parallelization in Python 2.6

Grant Edwards invalid at invalid
Wed Aug 19 10:14:11 EDT 2009


On 2009-08-19, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Dennis Lee Bieber wrote:

>> 	If they are number crunchers (CPU-bound) and don't make use of
>> binary extension libraries that release the GIL (for the most common
>> Python implementation), they'll run faster being called in sequence
>> since you won't have the overhead of task switching.
>
> ... unless, obviously, the hardware is somewhat up to date
> (which is not that uncommon for number crunching environments)
> and can execute more than one thing at once.

Even with multiple processors, it'll still be faster to call
them sequentially in a single thread than run them sequentially
in multiple threads with the GIL serializing them.

-- 
Grant Edwards                   grante             Yow! Gibble, Gobble, we
                                  at               ACCEPT YOU ...
                               visi.com            



More information about the Python-list mailing list