Serdar Yegulalp
Senior Writer

PyPy 7 speeds up Python 2.7, Python 3.5, and Python 3.6 alike

news
Feb 11, 20192 mins

The latest release of the JIT-compiling Python runtime updates support for three major versions of Python in one go.

speedometer / speed / fast / high performing / limits
Credit: KTSimage / Getty Images

PyPy, the Python runtime that uses just-in-time compilation to achieve major performance improvements over the stock CPython distribution, is now available in version 7.0 releases supporting Python 2.7, Python 3.5, and Python 3.6.

According to a post on the official PyPy Status Blog, all three versions use “much the same codebase, thus the triple release.” The Python 3.6 interpreter is “the first official release of PyPy to support Python 3.6 features, although it is still considered alpha quality.”  Most of the improvements to PyPy over the last release involve memory management and interfacing with external C code built for Python.

CPython provides programmatic hooks into its garbage collection subsystem. PyPy 7 goes a step further, running the garbage collector in incremental steps to prevent the garbage collection process from bringing programs to a halt for too long.

One longstanding issue with PyPy versus the stock CPython interpreter is that many packages that use binary wheels, or binary components built to run with the Python interpreter, may not work correctly or at the same speed. Officially, any C/C++ projects that need to work with PyPy should use the cffi and cppyy projects to wrap their binaries. The latest versions of these projects now work with PyPy.

Third parties also offer rebuilds of some popular Python packages, such as NumPy, Pandas, and SciPy, to work specifically with PyPy, but that build process is still experimental and yields binaries only for Ubuntu Linux.

Many of the other changes and improvements in PyPy 7 involve better support for async structures and compatibility with other language features in Python 3.5 and Python 3.6. However, PyPy’s creators advise that the release for Python 3.6, as well as for Python 3.5 for Windows, is “still not production quality” as “there are open issues with incomplete compatibility and C extension support.”

PyPy’s development has yielded benefits for the main CPython project as well. When PyPy’s developers rewrote the code for handling Python’s dictionary data structure to improve performance and save memory, CPython adopted that code as well. PyPy’s garbage collection features, such as the step-at-a-time collection system, would be useful in CPython too, but the fundamentally different ways the two runtimes handle garbage collection might make that hard to pull off.

Serdar Yegulalp

Serdar Yegulalp is a senior writer at InfoWorld. A veteran technology journalist, Serdar has been writing about computers, operating systems, databases, programming, and other information technology topics for 30 years. Before joining InfoWorld in 2013, Serdar wrote for Windows Magazine, InformationWeek, Byte, and a slew of other publications. At InfoWorld, Serdar has covered software development, devops, containerization, machine learning, and artificial intelligence, winning several B2B journalism awards including a 2024 Neal Award and a 2025 Azbee Award for best instructional content and best how-to article, respectively. He currently focuses on software development tools and technologies and major programming languages including Python, Rust, Go, Zig, and Wasm. Tune into his weekly Dev with Serdar videos for programming tips and techniques and close looks at programming libraries and tools.

More from this author