| 1 |
=============================== |
| 2 |
PyPy 1.4: Ouroboros in practice |
| 3 |
=============================== |
| 4 |
|
| 5 |
We're pleased to announce the 1.4 release of PyPy. This is a major breakthrough |
| 6 |
in our long journey, as PyPy 1.4 is the first PyPy release that can translate |
| 7 |
itself faster than CPython. Starting today, we are using PyPy more for |
| 8 |
our every-day development. So may you :) You can download it here: |
| 9 |
|
| 10 |
https://pypy.org/download.html |
| 11 |
|
| 12 |
What is PyPy |
| 13 |
============ |
| 14 |
|
| 15 |
PyPy is a very compliant Python interpreter, almost a drop-in replacement |
| 16 |
for CPython. It's fast (`pypy 1.4 and cpython 2.6`_ comparison) |
| 17 |
|
| 18 |
Among its new features, this release includes numerous performance improvements |
| 19 |
(which made fast self-hosting possible), a 64-bit JIT backend, as well |
| 20 |
as serious stabilization. As of now, we can consider the 32-bit and 64-bit |
| 21 |
linux versions of PyPy stable enough to run `in production`_. |
| 22 |
|
| 23 |
Numerous speed achievements are described on `our blog`_. Normalized speed |
| 24 |
charts comparing `pypy 1.4 and pypy 1.3`_ as well as `pypy 1.4 and cpython 2.6`_ |
| 25 |
are available on benchmark website. For the impatient: yes, we got a lot faster! |
| 26 |
|
| 27 |
More highlights |
| 28 |
=============== |
| 29 |
|
| 30 |
* PyPy's built-in Just-in-Time compiler is fully transparent and |
| 31 |
automatically generated; it now also has very reasonable memory |
| 32 |
requirements. The total memory used by a very complex and |
| 33 |
long-running process (translating PyPy itself) is within 1.5x to |
| 34 |
at most 2x the memory needed by CPython, for a speed-up of 2x. |
| 35 |
|
| 36 |
* More compact instances. All instances are as compact as if |
| 37 |
they had ``__slots__``. This can give programs a big gain in |
| 38 |
memory. (In the example of translation above, we already have |
| 39 |
carefully placed ``__slots__``, so there is no extra win.) |
| 40 |
|
| 41 |
* `Virtualenv support`_: now PyPy is fully compatible with virtualenv_: note that |
| 42 |
to use it, you need a recent version of virtualenv (>= 1.5). |
| 43 |
|
| 44 |
* Faster (and JITted) regular expressions - huge boost in speeding up |
| 45 |
the `re` module. |
| 46 |
|
| 47 |
* Other speed improvements, like JITted calls to functions like map(). |
| 48 |
|
| 49 |
.. _virtualenv: https://pypi.python.org/pypi/virtualenv |
| 50 |
.. _`Virtualenv support`: https://morepypy.blogspot.com/2010/08/using-virtualenv-with-pypy.html |
| 51 |
.. _`in production`: https://morepypy.blogspot.com/2010/11/running-large-radio-telescope-software.html |
| 52 |
.. _`our blog`: https://morepypy.blogspot.com |
| 53 |
.. _`pypy 1.4 and pypy 1.3`: https://speed.pypy.org/comparison/?exe=1%2B41,1%2B172&ben=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20&env=1&hor=false&bas=1%2B41&chart=normal+bars |
| 54 |
.. _`pypy 1.4 and cpython 2.6`: https://speed.pypy.org/comparison/?exe=2%2B35,1%2B172&ben=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20&env=1&hor=false&bas=2%2B35&chart=normal+bars |
| 55 |
|
| 56 |
Cheers, |
| 57 |
|
| 58 |
Carl Friedrich Bolz, Antonio Cuni, Maciej Fijalkowski, |
| 59 |
Amaury Forgeot d'Arc, Armin Rigo and the PyPy team |