News for hackers. Stuff that matters.
Re:Python's super considered harmful by masklinn on Tuesday December 28, 2010 @07:47AM (#2045322)
> Just to clarify, the GIL is worse than making writing multithreaded programs harder, it makes CPU bound singlethreaded tasks perform worse on multicore machines than on single core machines.

This is incorrect. I'm guessing you're making that claim based on David's discoveries on the old (2.x) GIL last year and didn't actually bother seeing the presentations (or reading the slides, or the blog posts). All the issues he outlined are in multithreaded workloads (why would the GIL do anything for single-threaded loads?). His original outline (the one which basically went viral) was about "GIL battles" (GIL contention) in the old GIL [0], and GIL contention happens when the OS schedules two Python threads for running simultaneously and they both try to run at the same time. How do you do that without running two Python threads simultaneously?

Later, David also exposed a convoy effect with IO-bound threads in the new (Python 3.2) GIL [1] [2]

See also his Interactive Python Thread Visualizations [3] and note that all of them involve at least 2 threads.

[0] http://dabeaz.blogspot.com/2010/01/python-gil-visualized.htm...

[1] http://bugs.python.org/issue7946

[2] http://dabeaz.blogspot.com/2010/02/revisiting-thread-priorit...

[3] http://www.dabeaz.com/GIL/gilvis/index.html

There are no comments on this comment yet.