using queue

Jan Kaliszewski zuo at chopin.edu.pl
Thu Sep 3 02:19:53 EDT 2009


06:49:13 Scott David Daniels <Scott.Daniels at acm.org> wrote:

> Tim Arnold wrote:

>> (1) what's wrong with having each chapter in a separate thread? Too  
>> much going on for a single processor?

> Many more threads than cores and you spend a lot of your CPU switching
> tasks.

In fact, python threads work relatively the best with a powerful single
core; with more cores it becomes being suprisingly inefficient.

The culprit is Pythn GIL and the way it [mis]cooperates with OS
scheduling.

See: http://www.dabeaz.com/python/GIL.pdf

Yo
*j

-- 
Jan Kaliszewski (zuo) <zuo at chopin.edu.pl>



More information about the Python-list mailing list