Links for 2010-02-19
Search results for url:taint.org on Delicious : wow, you can search a time period for everyone who bookmarked pages on a specific site (via Britta)
(tags: delicious search nifty tools egosurfing via:britta)Mindblowing Python GIL : ‘presentation about how the Python GIL actually works and why it’s even worse than most people even imagine.’ A good chunk btw could be rephrased as ‘pthreads is worse than most people even imagine’. pretty awful data, though
(tags: python gil locking synchronization ouch performance tuning coding interpreters threads pthreads)

David Malone said,
February 20, 2010 @ 12:36 pm
I wonder if they link python against a userland pthreads implementation that is actually single OS threaded, would it help? Other than the priority inversion problem, the core of the message seemed to be that threading can be inefficient because of locking and locking tends to be less efficient when you have more cores. I presumed that was well known.
(I didn’t watch the whole thing, but flicked through the slides after the first ten minutes.)
matt harrison said,
February 21, 2010 @ 7:18 am
Having just seen the updated version of this today at PyCON, I don’t think it’s a pthread issue at all. (In fact, Beazley claims linux performed better than MacOS and MS). Rather the GIL is naive to some corner cases. The 3.2 “new” GIL is better than old for some cases, but also has some extreme badness too. GvR is reluctant to remove the GIL (he in fact left the room before this preso), everyone claims it is a huge pain, all C extensions depend on it, previous attempts to remove it have mad single threaded code have a 2x performance hit, … The “solution” is use multiprocessing or an alternative python implementation (jython, ironpython) if the (c)python interpreter gives you undesirable results.
Pádraig Brady said,
February 22, 2010 @ 6:34 pm
Re delicious, they still get the total count wildly wrong.
Re GIL. Hopefully this will get more people using subprocess/multiprocessing instead of thinking they’re thorough enough to implement a threaded solution.