Serdar Yegulalp
Senior Writer

Pedal to the metal: PyPy 2.4 powers up Python

news analysis
Sep 24, 20142 mins

JIT-powered Python engine PyPy was already fast, but version 2.4 charges further ahead, thanks to multithreaded optimizations

Pythonistas wince when they hear the truism about Python being fast to develop in but slow to actually run. The newest iteration of an alternative Python interpreter aims to prove that wrong.

PyPy, an implementation of Python 2, has long been one of the projects designed to give Python a speed boost via its JIT (just in time) compiler. Under PyPy, many Python programs run an average of six times faster than with the stock Python interpreter.

“Snow White,” per PyPy 2.4’s code name, offers internal fixes and speed improvements over previous editions. For one, it uses Python’s 2.7.8 standard library, where the previous version of PyPy only supported up to version 2.7.5. The Windows version of PyPy has also been cleaned up to be statically linked to many common libraries to address Windows users’ complaints about missing DLLs.

Most of the performance improvements are due to a few key tweaks to the way JITing works. PyPy now uses what’s described as a “mixed polling and mutex GIL (global interpreter lock) model” to improve the speed of multithreaded code and to speed up the handling of calls to external libraries.

pypy speed https://speed.pypy.org/

PyPy can provide speed improvements of up to an order of magnitude over the stock implementation of Python.

The GIL has been a perennial roadblock to improving Python performance. It serializes access to Python’s interpreter by multiple threads and thus works as a gateway to the likes of high-performance C extensions. Some implementations of Python, such as the JVM-based Jython or the .Net-based IronPython, aren’t saddled with a GIL. As a trade-off, those interpreters can’t make use of C extensions. (C extensions work in PyPy, but not as-is; they have to be recompiled.)

The biggest drawback to using PyPy echoes the most divisive rift within the Python community: Right now, PyPy can’t support Python 3. That said, a project is in the works to enable Python 3 support in PyPy, but it’s a ways from being finished. Likewise, the Pyston project, which aims to use the LLVM compiler framework to compile Python to machine language, is targeting only Python 2.7 at this time.

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