Over a million developers have joined DZone.
Platinum Partner

PyPy Team Trying to Go Multicore

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix.  Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.

The PyPy team has updated their progress on getting rid of the infamous Global Interpreter Lock in Python.  According to their previous post, the team was attempting to approach the problem using Software Transactional Memory, a relatively recent development in computer science.  So far, the lock has been removed in Jython, but this is more of a problem in CPython.  According to the PyPy team:

The reason that it has not been done in CPython so far is that it's even more work: we would need to care not only about carefully adding fine-grained locks everywhere, but also about reference counting; and there are a lot more C extension modules that would need care, too. And we don't have locking primitives as performant as Java's, which have been hand-tuned since ages (e.g. to use help from the JIT compiler).

One commenter recognized that approaching this problem using Transactional Memory...

. . . is much, much harder to get right than it looks like in today effectful/imperative languages. Sure, it looks wonderful on paper, but if your language doesn't help you control side-effects it will give you a very hard time. -- gasche

Still, the PyPy team is suggesting that they have a plan for Python developers to use all their cores without ever having to write threads.  You can follow further developments and details on the project at the PyPy Status blog.

The Web Dev Zone is brought to you in partnership with Mendix.  Learn more about The Essentials of Digital Innovation and how it needs to be at the heart of every organization.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}