Using python as primary language

Michael Bacarella mbac at gpshopper.com
Thu Nov 8 19:05:26 EST 2007


> > > > A multithreaded application in Python will only use a single CPU
> on
> > > > multi-CPU machines due to big interpreter lock, whereas the
> "right
> > > thing"
> > > > happens in Java.
> > >
> > > Note that this is untrue for many common uses of threading (e.g.
> using
> > > threads to wait on network connections, or calling out to most
> common
> > > compute-intensive C extensions), where the GIL is released and
> > > multiple CPUs are used just fine.
> >
> > It's true in exactly the case where you would gain the most benefit
> > from multiple CPUs.  So I'm not sure how uncommon that is.
> 
> It's pretty uncommon. There are relatively few CPU bound tasks that
> are a) highly parallel and b) can't be easily scaled between
> processes. Python is not (by itself) an especially good tool for those
> tasks.

Is there any reason for this besides economics?

I only assumed this because Perl threads can tax multiple CPUs. 




More information about the Python-list mailing list