DEV Community

Cover image for CPython Is Dropping Its JIT, and Most Python Users Lose Very Little
Mango Developer
Mango Developer

Posted on Originally published at mangodeveloper.com

CPython Is Dropping Its JIT, and Most Python Users Lose Very Little

Python 3.15 shipped on October 9 with a much better JIT compiler. Ten days later, the people building that JIT withdrew the proposal that would have kept it in CPython. Brett Cannon of the Steering Council summed up the result on the Python forum: JIT work in CPython's repository has stopped, and the code "will come out and live somewhere else."

That sounds like a disaster for Python performance. For almost everyone who writes Python, it isn't. The JIT was off by default, needed a special build, and delivered single-digit average gains. What's being lost is a promising direction, not a feature you were running in production. I think the Steering Council's process, painful as it was, got the important part right.

How a shipped feature ended up withdrawn

The JIT arrived in Python 3.13 in 2024 as an experiment. It came in under PEP 744, an Informational PEP, which describes a design without committing the project to supporting it.

On June 5, 2026, the Steering Council posted a long announcement on discuss.python.org. It thanked the JIT team and said the recent performance improvements were "real and encouraging." It also said the council itself had "not been as strict about following the process as a change of this complexity and reach deserves," and asked for a Standards Track PEP that would make the case for the JIT as a supported part of CPython, covering "its guarantees, its maintenance commitments, and its impact on redistributors."

Until that PEP was accepted, no new JIT features, optimisations or performance work could land on main. Bug and security fixes could continue. The council set a six-month window and listed what it wanted answered: a long-term maintenance plan, compatibility with free-threading, profilers and debuggers, measurable targets for performance, platform coverage and memory overhead, the relationship to third-party JITs such as CinderX, Numba and PyTorch, and whether the architecture was stable.

Brandt Bucher, Savannah Ostrowski and Ken Jin wrote PEP 836, titled "JIT Go Brrr: The Path to a Supported JIT Compiler for CPython," and posted it on July 3. InfoWorld, citing LWN's reporting, says the council then found it lacking on how the JIT would be supported, how its performance would be evaluated and how it would work with debugging and profiling tools, and that it was overly optimistic about expected gains.

On October 19, Ostrowski posted the withdrawal: "The Steering Council rightly sets a high bar for a proposal of this scope, and we don't feel we have the personal bandwidth to carry the current version forward." The team said it still believes in the PEP's direction, including free-threaded support and a method-based frontend, and will publish the reference implementation alongside the withdrawn PEP.

Guido van Rossum, the creator of Python, photographed at PyCon US 2024

Expand

Guido van Rossum, the creator of Python, photographed at PyCon US 2024

Image: Kushal Das via Wikimedia Commons, CC BY-SA 4.0

What the JIT actually delivered

Python 3.15's What's New page gives the honest numbers. On the pyperformance suite, the JIT was 7-8% faster as a geometric mean than the standard interpreter built with all optimisations on x86-64 Linux, and 11-12% faster than the tail-calling interpreter on AArch64 macOS. The spread is the more interesting part: depending on the benchmark, JIT builds ranged from roughly 15% slower to more than 100% faster.

That's real work. 3.15's JIT gained a new tracing frontend that records actual execution paths, basic register allocation, more constant propagation, fewer reference count updates and GDB unwinding support. The contributor lists on those changes run long.

But a 7-8% average that can also mean a 15% slowdown on your workload is a hard thing to promise users. It also came with a cost for the people building Python: the 3.15 JIT needs LLVM 21 at build time. InfoWorld notes the gains were measurable but small, and mostly showed up in programs with long-running tight loops.

Who is actually affected

Very few people, in practice. The JIT was never switched on by default. In 3.13 you had to build CPython with --enable-experimental-jit, or PCbuild/build.bat --experimental-jit on Windows. From 3.14, the official macOS and Windows installers from python.org include the JIT but leave it off; you test it by setting PYTHON_JIT=1. Redistributors can do the same with --enable-experimental-jit=yes-off.

So unless you set PYTHON_JIT=1 or built CPython with the JIT forced on, your Python wasn't using it. You can check from inside Python 3.14 or later: sys._jit.is_available() tells you whether your build has a JIT, and sys._jit.is_enabled() whether it's active in the current process. If the second one returns False, nothing changes for you.

The people who should pay attention:

  1. Anyone who built a custom CPython with the JIT for a production service. Python 3.13 to 3.15 still contain it, but don't plan on it existing in 3.16 or later.
  2. Redistributors and packagers who ship JIT-capable builds, since the LLVM build dependency and the JIT itself are on their way out of main.
  3. Contributors who were working on JIT pull requests. That work now needs a home outside CPython's repository.

If you're in the first group, measure your service with PYTHON_JIT=0 today. If the difference is small, drop the custom build and save yourself the maintenance.

Panel of speakers on stage at the closing session of PyCon Asia Pacific, a community Python conference

Expand

Panel of speakers on stage at the closing session of PyCon Asia Pacific, a community Python conference

Image: Malcolm Tredinnick via Wikimedia Commons, CC BY 2.0

Why I think the council was right

A JIT in a language runtime isn't a library you can deprecate quietly. It touches the interpreter loop, the debugger story, profilers, memory use, every platform Python supports and every distributor who builds Python. Once it's a supported feature, it's supported for a decade.

The June announcement asked exactly the questions you'd want answered before that commitment: who maintains this in five years, what happens to free-threading, and how do tools like debuggers keep working. None of those are unreasonable. The withdrawal message didn't argue otherwise. It said the team didn't have the bandwidth to answer them in the current form.

The part I'd criticise is timing. CPython let the JIT sit on main for more than two years under an Informational PEP, through three releases, before asking for the commitments. The council admitted as much. Asking those questions in 2024 would have been kinder to the people who did the work.

On the forum, one participant pointed out that the council's six-month window technically runs until about December 5, so an alternative PEP could still appear. Cannon replied that this was unlikely, since everyone actively driving the JIT had worked on PEP 836 and the decision to withdraw was made as a group at the core developer sprints.

Where Python speed comes from now

Faster Python doesn't depend on this JIT. InfoWorld points to the specialising adaptive interpreter that arrived in Python 3.11, which uses type-specialised bytecode and needs no code changes. Python 3.14 added the tail-calling interpreter that 3.15's macOS benchmarks compare against. Interpreter work like this continues on main.

If you need a JIT today, the options are outside CPython. PyPy uses a mature tracing JIT and can be dramatically faster on pure-Python code, but it trails CPython releases and has had performance and compatibility issues with C extensions, as InfoWorld notes. Meta's CinderX offers a JIT as an add-on but is also considered experimental. For numeric code, Numba remains the practical way to compile hot functions.

My advice is simple. Upgrade to 3.15 for its other improvements, including the native Windows on Arm builds we covered earlier this month, profile before reaching for a JIT, and watch where the published reference implementation goes. If a community team picks it up and answers the council's questions, CPython could still get a JIT, just with the commitments in writing first.


Originally published on Mango Developer.

Top comments (0)