Will Python 3.0 remove the global interpreter lock (GIL)

Paul Rubin http
Thu Sep 20 10:43:18 EDT 2007


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> That's why your "comparatively wimpy site" preferred to throw extra web 
> servers at the job of serving webpages rather than investing in smarter, 
> harder-working programmers to pull the last skerricks of performance out 
> of the hardware you already had.

The compute intensive stuff (image rendering and crunching) has
already had most of those skerricks pulled out.  It is written in C
and assembler (not by us).  Only a small part of our stuff is written
in Python: it just happens to be the part I'm involved with.

> But Python speed ups don't come for free. For instance, I'd *really* 
> object if Python ran twice as fast for users with a quad-core CPU, but 
> twice as slow for users like me with only a dual-core CPU.

Hmm.  Well if the tradeoff were selectable at python configuration
time, then this option would certainly be worth doing.  You might not
have a 4-core cpu today but you WILL have one soon.

> What on earth makes you think that would be anything more than a 
> temporary, VERY temporary, shutdown? My prediction is that the last of 
> the machines wouldn't have even been unplugged

Of course that example was a reductio ad absurdum.  In reality they'd
use the speedup to compute 2x as much stuff, rather than ever powering
any servers down.  Getting the extra computation is more valuable than
saving the electricity.  It's just easier to put a dollar value on
electricity than on computation in an example like this.  It's also
the case for our specfiic site that our server cluster is in large
part a disk farm and not just a compute farm, so even if we sped up
the software infinitely we'd still need a lot of boxes to bolt the
disks into and keep them spinning.

> Now there's a thought... given that Google:
> 
> (1) has lots of money;
> (2) uses Python a lot;
> (3) already employs both Guido and (I think...) Alex Martelli and 
> possibly other Python gurus;
> (4) is not shy in investing in Open Source projects;
> (5) and most importantly uses technologies that need to be used across 
> multiple processors and multiple machines
> 
> one wonders if Google's opinion of where core Python development needs to 
> go is the same as your opinion?

I think Google's approach has been to do cpu-intensive tasks in other
languages, primarily C++.  It would still be great if they put some
funding into PyPy development, since I think I saw something about the
EU funding being interrupted.



More information about the Python-list mailing list