No speedup on multi-processor machine?

Fuzzyman fuzzyman at gmail.com
Sat Apr 21 19:18:15 EDT 2007


On Apr 21, 10:53 pm, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On 21 Apr 2007 14:02:12 -0700, danfan1... at yahoo.com declaimed the
> following in comp.lang.python:
>
> > Hi,
> > I am using Python Thread library for my parallel processing course
> > project. I am doing matrix convolution on a multi-processor machine
> > running Solaris. I just found out that no speed-up is obtained with
> > threading. It is probably because of something called GIL in Python.
> > How can I get around
> > that GIL and get speed-up?
>
>         Threading in Python is optimized for I/O bound processing, wherein
> the threads spend most of their lives sleeping (blocked waiting for some
> I/O to complete, or some lock/event/condition to change state). It is
> not optimized for parallel number crunching.
>
> Options:
>
>         Don't use the common "CPython" (eg, the Python built from C-language
> source using the C-runtime library). Jython (a version that runs on the
> JVM, using Java libraries) may not be afflicted with the GIL.
>

IronPython is *definitely* not restricted by the GIL.

Fuzzyman
http://www.voidspace.org.uk/ironpython/index.shtml




More information about the Python-list mailing list