Python 3.14 incorporates experimental JIT compiler: what changes?
The new JIT compiler in Python 3.14 promises to speed up certain loops by up to 30%, but it is still experimental and does not affect all code.
June 21, 2026 · 5 min read

TL;DR: Python 3.14 includes an experimental JIT compiler that improves performance of loops and numeric operations by 10% to 30%. It is optional, does not affect all code, and is not yet production-ready.
What happened?
Python 3.14, currently under development, includes an experimental Just-In-Time (JIT) compiler called the 'copy-and-patch' JIT. This compiler translates certain bytecode operations into machine code at runtime, aiming to speed up loops and intensive numerical code. According to PEP 744, the JIT is based on the 'copy-and-patch' compilation framework used in LuaJIT and other projects. In preliminary tests, speed gains of between 10% and 30% are observed in benchmarks like pyperformance, although the JIT is disabled by default and must be activated via an environment variable or command-line flag.
The 'copy-and-patch' approach originated in compiler research, standing out for its ability to generate machine code quickly by copying precompiled templates and patching them with context-specific values. This method is particularly effective in scenarios where compilation time is critical, such as JIT compilation. Unlike traditional JITs that compile from scratch, 'copy-and-patch' reduces compilation overhead, making it attractive for a dynamic language like Python.
Historically, Python's speed has been a weak point. Languages like C++ or Rust can be tens of times faster in CPU-intensive operations. Previous initiatives like PyPy (an alternative interpreter with JIT) have shown speedups of 4 to 10 times, but their adoption has been limited due to incompatibilities with C extensions and popular libraries like NumPy. CPython's native JIT aims to overcome these barriers by integrating directly into the official interpreter.
Why is it important?
Python has historically been criticized for its speed compared to compiled languages like C++ or Rust. Although solutions like PyPy (which uses JIT) or Cython exist, CPython's native JIT represents a paradigm shift: for the first time, the official interpreter incorporates runtime optimization. This could close the performance gap for scientific, data, and automation applications without requiring changes to user code. Additionally, the 'copy-and-patch' design is modular and could facilitate future optimizations.
The potential impact is enormous. Companies running intensive Python workloads, such as data processing, machine learning model training, or process automation, could see significant reductions in infrastructure costs. For example, a 20% gain in execution speed could translate into 20% less cloud computing time, resulting in direct savings. Moreover, for real-time or low-latency applications like algorithmic trading or recommendation systems, even modest improvements can make a difference.
However, it is crucial to understand that this JIT is not a universal solution. It is specifically designed for loops and arithmetic operations, and its effectiveness depends on the application profile. Code with many native function calls (like those from NumPy) or I/O operations will not benefit significantly. In fact, in some cases, JIT overhead could degrade performance, especially in programs with very short execution times.
Consequences and context
The JIT in Python 3.14 is experimental and not recommended for production. Enabling it may break compatibility with existing C extensions and does not improve all types of code (e.g., code with many native function calls or I/O). Historically, projects like PyPy have shown that a JIT can speed up Python by 4 to 10 times, but CPython's JIT is more conservative and focuses on local optimizations. In the long term, it could pave the way for a more aggressive JIT in future versions. For developers, this means they will need to test their applications with the JIT enabled and measure the real impact. Companies using Python for web services, data science, or automation could benefit from lower computing costs, but adoption will be gradual.
The historical context is relevant. Python has had multiple attempts to improve its performance: from Psyco (an early JIT) to PyPy, and Cython (which translates Python to C). However, none have achieved mass adoption due to compatibility issues or complexity. CPython's approach is different: it integrates the JIT directly into the official interpreter, ensuring compatibility with the vast majority of libraries. This could be the decisive factor for its eventual success.
For developers, the arrival of the JIT implies new considerations. They will need to familiarize themselves with activation options and monitor their applications' performance. Profiling tools like cProfile or py-spy will be essential to identify which parts of the code benefit from the JIT. Additionally, the community will need to report bugs and provide feedback to improve the compiler before its stable release.
Python 3.14's JIT is a promising first step, but not a silver bullet. The community should wait for stable versions to evaluate its real impact.
What should readers know?
- Python 3.14 is in alpha; the stable version is expected in October 2025.
- The JIT is activated with
PYTHON_JIT=1or-X jit. - It does not improve all code; it is designed for loops and arithmetic operations.
- It may increase memory usage and startup time.
- It is compatible with most C extensions, but issues may arise.
Additionally, it is important for developers to understand that the JIT is only part of a broader effort to improve Python's performance. The CPython team is also working on other optimizations, such as the removal of the Global Interpreter Lock (GIL) in experimental Python 3.13, and improvements to the garbage collector. These combined initiatives could significantly transform Python's performance profile in the coming years.
For end users, the impact will be indirect. Applications that rely on Python for intensive tasks could become faster and more efficient, improving user experience. However, the changes will be transparent, as the JIT will be activated automatically (in the future) or via configuration. The key will be adoption by popular frameworks and libraries.
In summary, Python 3.14's JIT represents a major milestone in the language's evolution, but its success will depend on community collaboration and continuous improvements in later versions. Developers should stay informed and be prepared to adapt their development practices.