Python-accelerating PyPy 2.0 for x86 released
The developers of PyPy, an alternative Python 2.x implementation with a just-in-time compiler that's "almost a drop-in replacement for CPython 2.7", have announced the release of PyPy 2.0. According to the developers' benchmarking site PyPy 2.0 is around 5.71 times faster than CPython 2.7.3.
PyPy 2.0, code-named "Einstein Sandwich", supports the x86 processors running 32- or 64-bit Linux, Mac OS X (64-bit) and Windows 32-bit. Work on the 64-bit Windows port is stalling and the team are looking for a volunteer to help. ARM support is coming; earlier this week an alpha version of PyPy 2.0 for ARM was released.
The new release of PyPy supports Stackless and also includes support for greenlet, the lightweight in-process concurrent programming package spun out from Stackless development – Gevent support has its own supported branch for Pypy. For interfacing to C code, CFFI, the Foreign Function Interface is now a module included with PyPy and is the preferred way to call C from Python on PyPy.
Callbacks from C are now just-in-time compiled, which is of particular benefit to XML-parsing performance, and there are various other small speed improvements in "language corners", along with many fixed stability issues. Changes to the JIT mean it now emits code that manipulates a frame that lives on the heap rather than the stack; this is the change that makes Stackless work and, the developers say, should open the way for another, not yet implemented, performance improvement. Finally there has also been a refactoring of the NumPyPy array classes which, despite losing lazy expression evaluation, now has better dtype and array attribute support.
The developers say PyPy 2.0 is hopefully the first of more frequent stable releases for the Python runtime platform. PyPy 2.0 binaries are available to download from the project's web site and are also available from various Linux distributions' repositories. The MIT-licensed PyPy is, of course, available as source code from the same location.