Fundamentals 5 min read

Pyston v2: A JIT‑Enhanced Python Interpreter 20% Faster Than CPython

Released in October 2020, Pyston v2 is a JIT‑based Python implementation that delivers roughly 20% speed improvements over CPython 3.8 in macro‑benchmarks, offers easy deployment, maintains high compatibility with CPython, and incorporates techniques such as DynASM JIT, quickening, and process‑building optimizations.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Pyston v2: A JIT‑Enhanced Python Interpreter 20% Faster Than CPython

In 2014, the original Pyston project was launched by Dropbox with the goal of creating a high‑performance Python implementation that could compete with system‑level languages like C++.

Pyston uses a JIT compiler: Python code is translated to LLVM IR, optimized by LLVM, and then JIT‑compiled to native machine code.

After six years of development, the team released Pyston v2 on October 28, 2020.

Pyston v2: 20% Faster Than Python

According to the developers, macro‑benchmarks show Pyston v2 is about 20% faster than Python 3.8, reduces server costs, shortens user‑perceived latency, and boosts developer productivity.

The interpreter is also easy to deploy; a simple package installation can replace the standard Python binary and improve performance with minimal effort.

Performance

Pyston v2 delivers noticeable speed gains across many workloads, not only web‑server benchmarks but also a variety of common benchmarks.

The team created a new public Python macro‑benchmark suite to measure performance of several popular Python projects.

In micro‑benchmarks such as chaos.py and nbody.py , Pyston v2 runs roughly twice as fast as standard Python.

On target benchmarks (DjangoCMS + FlaskBlogging), Pyston v2 achieved an average latency improvement of 1.22× and a p99 latency improvement of 1.18×, while memory overhead per process increased by only a few megabytes.

Technical Methods

Low‑overhead JIT using DynASM

Quickening

General CPython optimizations

Process‑building enhancements

Compatibility

Because Pyston is a fork of CPython, it claims the strongest compatibility among Python implementations, supporting all CPython features and the C API. In practice, new implementations may encounter temporary compatibility issues; details are available on the project wiki.

Usability

Pyston v2.0 is available as pre‑built packages for Ubuntu 18.04 and 20.04 (x86_64). Installation involves replacing the python3 binary with pyston3 and reinstalling dependencies via pip‑pyston3 , a change that can be made with only a few lines in existing build scripts.

The team plans to open‑source the code in the future, though the compiler component remains closed due to high development costs; Pyston v1.0 source code is already open.

Original article: https://blog.pyston.org/2020/10/28/pyston-v2-20-faster-python/

performancePythonruntimeJITinterpreterpyston
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.