Py Py

PyPy is a self hosting implementation of the PythonLanguage with various innovative features. It is developed in a open source fashion. Development is pushed forward with sprints (PythonSprint).


How is this project doing now? Anything downloadable yet?


We are writing a Python interpreter in Python, using Python's well known ability to step behind the algorithmic problems as language. At first glance, one might think this achieves nothing but a better understanding for everybody how the interpreter works. This alone would make it worth doing, but we have much larger goals.

CeePython? vs. PyPy

Compared to the CPython implementation, Python takes the role of the C Code. So actually, we describe something by Python, which has been coded in C already, with all the restrictions that are implied by C. We are not trying to make the structures of the CPython interpreter more flexible by rewriting things in C, but we want to use Python to give an alternative description of the interpreter.

The clear advantage is that this description is probably shorter and simpler to read, and many implementation details vanish. The drawback of this approach is that this interpreter will be unbearably slow.

To get to a useful interpreter again, we need to apply some mappings to the implementation, later. One rather straight-forward is to do a whole program analysis of the PyPy interpreter and create a C source, again. There are many other ways, but let's stick with the easiest approach, first.

In order to make a C code generator simple, we restrict ourselves to a subset of the Python language, and we adhere to some rules, which make code generation obvious and easy.

Now PyPy is already working for Python 2.7, and it's faster than CPython for many workloads (but it tends to use more memory - fortunately overhead is more or less constant).


Speed comparision: http://speed.pypy.org/


CategoryPython


EditText of this page (last edited July 24, 2014) or FindPage with title or text search