Serdar Yegulalp
Senior Writer

PyPy 5: A faster, leaner Python compiler

news analysis
Mar 10, 20162 mins

The update shaves down startup time and memory use, and it introduces improved options for interfacing with and embedding Python into C code

speed up fast quick 5
Credit: Thinkstock

A mere three months after the PyPy project released version 4.0 of its just-in-time optimizing compiler for Python, it’s unleashed version 5.0. The newest edition is a “faster and leaner” upgrade to one of the simplest and most direct tools to speed up Python applications.

PyPy tackles two ongoing issues — startup time and memory consumption — in this release. PyPy’s maintainers claim warmup time (when a script is first parsed for execution and optimized for speed) and memory consumption can both be reduced by about 30 percent with some applications.

PyPy 5.0 also has an upgraded C-level API so that Python scripts using C components (for example, by way of Cython) are both more compatible and faster. PyPy’s team reports that “this major refactoring will soon be followed by an expansion of our C-API compatibility.”

Similarly, cffi, PyPy’s library for interfacing with components written in C, has been upgraded. PyPy applications can now be embedded within a C program, allowing developers to use both C and Python, regardless of which language they’re most comfortable with. In addition, cffi may be a long-term replacement for Python’s ctypes system. This will likely happen at first on a project-by-project basis and not within Python itself.

PyPy has drastically improved one of its biggest drawbacks — its handling of external C code — over the course of recent point revisions, version 5.0 included. Its other major issue, support for Python 3, remains more intractable. PyPy supports Python 3 through a separate project, the appropriately named PyPy3, but it lags behind the core PyPy project. Python 2 support is fading in advance of support ending in 2020, so over the next couple of years, the PyPy project will be under mounting pressure to bring PyPy3 up to speed with its predecessor.

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