ep2005/ ep2007/ ep2009/ ep2011/ ep2012/ for those who missed previous EPs, PyPy is a Python interpreter with a JIT. antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 1 / 35
ep2005/ ep2007/ ep2009/ ep2011/ ep2012/ for those who missed previous EPs, PyPy is a Python interpreter with a JIT. antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 1 / 35
about anything else will be a bit slower with the JIT than without. We are working on this - you can even expect quick progress, because it is mostly a matter of adding a few careful hints in the source code of the Python interpreter of PyPy.” (status of the JIT of PyPy as of March 2007) antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 2 / 35
December 2010 release 1.4 Funding EU FP6 programme Eurostars programme donations ... antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 3 / 35
ago) 2.2x than 1.4 5.5x than CPython Implements Python 2.7.2 Many more “PyPy-friendly” programs Packaging Debian, Ubuntu, Fedora, Homebrew, Gentoo, ArchLinux, ... Windows (32bit only), OS X C extension compatibility runs (big part of) PyOpenSSL and lxml antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 4 / 35
U.S. bureaucracy we are happy about it Funding model py3k, numpy, STM more than 100’000$ in donations from individuals, large companies and the PSF thank to all antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 5 / 35
in 3 seconds run your script in 0.1s Glue language integrating with C is “easy” antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 6 / 35
JIT-ting one piece at a time “takes a while” Cannot cache JIT-ted code between runs We did not spend much time on this PyPy JIT Under the hood July 4 2012 antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 8 / 35
JIT-ting one piece at a time “takes a while” Cannot cache JIT-ted code between runs We did not spend much time on this PyPy JIT Under the hood July 4 2012 antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 8 / 35
correctness Dropped some interpreter optimizations for now Work in progress antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 9 / 35
string vs unicode, int/long unification syntactic changes (print(), except, ...) set, oct, binary, bytes literals view and iterators instead of lists function annotations, keyword only arguments nonlocal extended iterable unpacking dictionary comprehensions raise ... from ..., lexical exception handling __pycache__ Most features are already there major exception: unicode identifiers antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 10 / 35
all dtypes, except complex, strings and objects tons of functions missing you can help! antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 12 / 35
Management: messy, hard to debug rare leaks or corruptions automatic GC solves it (like in Python) antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 26 / 35
many conflicts up to: systematic conflicts This still approaches the issue from “the right side” antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 30 / 35
many conflicts up to: systematic conflicts This still approaches the issue from “the right side” antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 30 / 35
the next 10-15 years On CPython we are stuck with threads for the next 10-15 years antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 31 / 35
HTM too limited for long transactions Long transactions give a better programming model For years to come, only in PyPy Unless major effort from CPython devs antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 32 / 35
foreseeable future, Python programmers stuck with using threads antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 33 / 35
own point of view only Or maybe everybody will switch to PyPy antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 34 / 35
own point of view only Or maybe everybody will switch to PyPy antocuni, fijal, arigo (EuroPython 2012) PyPy: current status and GIL-less future July 2 2012 34 / 35