Debian Codegraph @

pypy/doc/release-2.2.0.rst

raw
1 =======================================
2 PyPy 2.2 - Incrementalism
3 =======================================
4
5 We're pleased to announce PyPy 2.2, which targets version 2.7.3 of the Python
6 language. This release main highlight is the introduction of the incremental
7 garbage collector, sponsored by the `Raspberry Pi Foundation`_.
8
9 This release also contains several bugfixes and performance improvements.
10
11 You can download the PyPy 2.2 release here:
12
13 https://pypy.org/download.html
14
15 We would like to thank our donors for the continued support of the PyPy
16 project. We showed quite a bit of progress on all three projects (see below)
17 and we're slowly running out of funds.
18 Please consider donating more so we can finish those projects! The three
19 projects are:
20
21 * Py3k (supporting Python 3.x): the release PyPy3 2.2 is imminent.
22
23 * STM (software transactional memory): a preview will be released very soon,
24 as soon as we fix a few bugs
25
26 * NumPy: the work done is included in the PyPy 2.2 release. More details below.
27
28 .. _`Raspberry Pi Foundation`: https://www.raspberrypi.org
29
30 What is PyPy?
31 =============
32
33 PyPy is a very compliant Python interpreter, almost a drop-in replacement for
34 CPython 2.7. It's fast (`pypy 2.2 and cpython 2.7.2`_ performance comparison)
35 due to its integrated tracing JIT compiler.
36
37 This release supports x86 machines running Linux 32/64, Mac OS X 64, Windows
38 32, or ARM (ARMv6 or ARMv7, with VFPv3).
39
40 Work on the native Windows 64 is still stalling, we would welcome a volunteer
41 to handle that.
42
43 .. _`pypy 2.2 and cpython 2.7.2`: https://speed.pypy.org
44
45 Highlights
46 ==========
47
48 * Our Garbage Collector is now "incremental". It should avoid almost
49 all pauses due to a major collection taking place. Previously, it
50 would pause the program (rarely) to walk all live objects, which
51 could take arbitrarily long if your process is using a whole lot of
52 RAM. Now the same work is done in steps. This should make PyPy
53 more responsive, e.g. in games. There are still other pauses, from
54 the GC and the JIT, but they should be on the order of 5
55 milliseconds each.
56
57 * The JIT counters for hot code were never reset, which meant that a
58 process running for long enough would eventually JIT-compile more
59 and more rarely executed code. Not only is it useless to compile
60 such code, but as more compiled code means more memory used, this
61 gives the impression of a memory leak. This has been tentatively
62 fixed by decreasing the counters from time to time.
63
64 * NumPy has been split: now PyPy only contains the core module, called
65 ``_numpypy``. The ``numpy`` module itself has been moved to
66 ``https://bitbucket.org/pypy/numpy`` and ``numpypy`` disappeared.
67 You need to install NumPy separately with a virtualenv:
68 ``pip install git+https://bitbucket.org/pypy/numpy.git``;
69 or directly:
70 ``git clone https://bitbucket.org/pypy/numpy.git``;
71 ``cd numpy``; ``pypy setup.py install``.
72
73 * non-inlined calls have less overhead
74
75 * Things that use ``sys.set_trace`` are now JITted (like coverage)
76
77 * JSON decoding is now very fast (JSON encoding was already very fast)
78
79 * various buffer copying methods experience speedups (like list-of-ints to
80 ``int[]`` buffer from cffi)
81
82 * We finally wrote (hopefully) all the missing ``os.xxx()`` functions,
83 including ``os.startfile()`` on Windows and a handful of rare ones
84 on Posix.
85
86 * numpy has a rudimentary C API that cooperates with ``cpyext``
87
88 Cheers,
89 Armin Rigo and Maciej Fijalkowski