| 1 |
=============== |
| 2 |
PyPy 2.0 beta 1 |
| 3 |
=============== |
| 4 |
|
| 5 |
We're pleased to announce the 2.0 beta 1 release of PyPy. This release is |
| 6 |
not a typical beta, in a sense the stability is the same or better than 1.9 |
| 7 |
and can be used in production. It does however include a few performance |
| 8 |
regressions documented below that don't allow us to label is as 2.0 final. |
| 9 |
(It also contains many performance improvements.) |
| 10 |
|
| 11 |
The main features of this release are support for ARM processor and |
| 12 |
compatibility with CFFI. It also includes |
| 13 |
numerous improvements to the numpy in pypy effort, cpyext and performance. |
| 14 |
|
| 15 |
You can download the PyPy 2.0 beta 1 release here: |
| 16 |
|
| 17 |
https://pypy.org/download.html |
| 18 |
|
| 19 |
What is PyPy? |
| 20 |
============= |
| 21 |
|
| 22 |
PyPy is a very compliant Python interpreter, almost a drop-in replacement for |
| 23 |
CPython 2.7.3. It's fast (`pypy 2.0 beta 1 and cpython 2.7.3`_ |
| 24 |
performance comparison) due to its integrated tracing JIT compiler. |
| 25 |
|
| 26 |
This release supports x86 machines running Linux 32/64, Mac OS X 64 or |
| 27 |
Windows 32. It also supports ARM machines running Linux. |
| 28 |
Windows 64 work is still stalling, we would welcome a volunteer |
| 29 |
to handle that. |
| 30 |
|
| 31 |
.. _`pypy 2.0 beta 1 and cpython 2.7.3`: https://bit.ly/USXqpP |
| 32 |
|
| 33 |
How to use PyPy? |
| 34 |
================ |
| 35 |
|
| 36 |
We suggest using PyPy from a `virtualenv`_. Once you have a virtualenv |
| 37 |
installed, you can follow instructions from `pypy documentation`_ on how |
| 38 |
to proceed. This document also covers other `installation schemes`_. |
| 39 |
|
| 40 |
.. _`pypy documentation`: https://doc.pypy.org/getting-started.html#installing-using-virtualenv |
| 41 |
.. _`virtualenv`: https://www.virtualenv.org/en/latest/ |
| 42 |
.. _`installation schemes`: https://doc.pypy.org/getting-started.html#installing-pypy |
| 43 |
.. _`PyPy and pip`: https://doc.pypy.org/getting-started.html#installing-pypy |
| 44 |
|
| 45 |
Regressions |
| 46 |
=========== |
| 47 |
|
| 48 |
Reasons why this is not PyPy 2.0: |
| 49 |
|
| 50 |
* the ``ctypes`` fast path is now slower than it used to be. In PyPy |
| 51 |
1.9 ``ctypes`` was either incredibly faster or slower than CPython depending whether |
| 52 |
you hit the fast path or not. Right now it's usually simply slower. We're |
| 53 |
probably going to rewrite ``ctypes`` using ``cffi``, which will make it |
| 54 |
universally faster. |
| 55 |
|
| 56 |
* ``cffi`` (an alternative to interfacing with C code) is very fast, but |
| 57 |
it is missing one optimization that will make it as fast as a native |
| 58 |
call from C. |
| 59 |
|
| 60 |
* ``numpypy`` lazy computation was disabled for the sake of simplicity. |
| 61 |
We should re-enable this for the final 2.0 release. |
| 62 |
|
| 63 |
Highlights |
| 64 |
========== |
| 65 |
|
| 66 |
* ``cffi`` is officially supported by PyPy. You can install it normally by |
| 67 |
using ``pip install cffi`` once you have installed `PyPy and pip`_. |
| 68 |
The corresponding ``0.4`` version of ``cffi`` has been released. |
| 69 |
|
| 70 |
* ARM is now an officially supported processor architecture. |
| 71 |
PyPy now work on soft-float ARM/Linux builds. Currently ARM processors |
| 72 |
supporting the ARMv7 and later ISA that include a floating-point unit are |
| 73 |
supported. |
| 74 |
|
| 75 |
* This release contains the latest Python standard library 2.7.3 and is fully |
| 76 |
compatible with Python 2.7.3. |
| 77 |
|
| 78 |
* It does not however contain hash randomization, since the solution present |
| 79 |
in CPython is not solving the problem anyway. The reason can be |
| 80 |
found on the `CPython issue tracker`_. |
| 81 |
|
| 82 |
* ``gc.get_referrers()`` is now faster. |
| 83 |
|
| 84 |
* Various numpy improvements. The list includes: |
| 85 |
|
| 86 |
* axis argument support in many places |
| 87 |
|
| 88 |
* full support for fancy indexing |
| 89 |
|
| 90 |
* ``complex128`` and ``complex64`` dtypes |
| 91 |
|
| 92 |
* `JIT hooks`_ are now a powerful tool to introspect the JITting process that |
| 93 |
PyPy performs. |
| 94 |
|
| 95 |
* ``**kwds`` usage is much faster in the typical scenario |
| 96 |
|
| 97 |
* operations on ``long`` objects are now as fast as in CPython (from |
| 98 |
roughly 2x slower) |
| 99 |
|
| 100 |
* We now have special strategies for ``dict``/``set``/``list`` which contain |
| 101 |
unicode strings, which means that now such collections will be both faster |
| 102 |
and more compact. |
| 103 |
|
| 104 |
.. _`cpython issue tracker`: https://bugs.python.org/issue14621 |
| 105 |
.. _`jit hooks`: https://doc.pypy.org/jit-hooks.html |
| 106 |
|
| 107 |
Things we're working on |
| 108 |
======================= |
| 109 |
|
| 110 |
There are a few things that did not make it to the 2.0 beta 1, which |
| 111 |
are being actively worked on. Greenlets support in the JIT is one |
| 112 |
that we would like to have before 2.0 final. Two important items that |
| 113 |
will not make it to 2.0, but are being actively worked on, are: |
| 114 |
|
| 115 |
* Faster JIT warmup time. |
| 116 |
|
| 117 |
* Software Transactional Memory. |
| 118 |
|
| 119 |
Cheers, |
| 120 |
Maciej Fijalkowski, Armin Rigo and the PyPy team |