While the vast majority of Python developers currently use CPython, which is downloaded at python.org, another Python implementation written in Python - PyPy - is gaining support from developers. Some
see PyPy as a better platform for Python's growth. There are three different projects
in this year's Google Summer of Code related to PyPy.64-bit JIT Backend
A widely requested feature for PyPy has been updated support for x86 64-bit compatibility for the JIT backend. Jason Creighton will be working on adding this update at this year's GSoC. Having the JIT emit 64-bit assembler code isn't too hard because the JIT backend is abstracted so that it is almost totally separate from the interpreter. This is one of the main reasons why PyPy is well suited for growth, because changes can be made to the language without having to update the JIT. You can maintain the speed of the JIT while making updates to the language, therefore you don't need to be an assembly expert to write new bytecode. Faster ctypes
Compatibility with extension modules has been a longstanding pain point for PyPy, but the project has made significant strides towards reducing this weak point in recent years. This was accomplished by introducing ctypes
for PyPy and then moving towards CPython extension modules
. However, ctypes are notoriously slow (and even slower in PyPy). That's why Bartosz Skowron is going to try applying JIT technology to ctypes. Some research will be done to see if PyPy can compile calls to C code from Python as direct calls in the compiled assembler. NumPy and PyPy
This joint project between NumPy
and PyPy is being developed by Dan Roberts. The objective is to get a quick version of NumPy integration with PyPy. Most of the integration will consist of original NumPy support with a CPython extension. There will also be a minimal native NumPy framework for PyPy. NumPy will retain full compatibility and PyPy will get JIT integration. There are also plans for an explicit interface for converting one array to another.
PyPy has a number of benchmarks
showing its speed compared to CPython. PyPy is also able to automatically generate C code along with JVM and .NET versions of the interpreter (no need to write in Jython or IronPython).
The JIT backend
and ctypes project
are now official branches on the PyPy tree.