On 1/9/12 5:35 AM, John Nagle wrote:
Python has some serious problems that preclude optimization. Basically, the language is designed to be run by a naive (non-optimizing) interpreter, and allows things that are easy for such an implementation but very tough to optimize. An example is the ability to store into the variables of a module from outside it, and even from another thread. Every attempt to get rid of the Global Interpreter Lock has hit that problem.
You keep repeating this falsehood about the GIL. You have been repeatedly shown that this is false[1][2], though I have yet to see you acknowledge it. The GIL exists to protect Python's internal data structures, mostly the reference counts on objects. The reason that the attempts to remove the GIL from CPython have not been accepted is because they cause unacceptable performance losses in the common unthreaded case. In implementations of Python that do not use reference counting, there is no GIL. Neither Jython nor IronPython have a GIL, but they both have the standard Python semantics that let you store variables into modules from the outside, even from other threads.
[1] http://mail.python.org/pipermail/python-list/2011-February/1265760.html [2] http://mail.python.org/pipermail/python-list/2011-April/1269056.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list