Free-threaded CPython represents a major milestone in the language's history, opening the door to true parallelism for CPU-intensive Python applications.
Python 3.13 is a that sets the stage for the future. The verified truths are:
While the JIT compiler is the headline performance feature, Python 3.13 includes several other optimizations:
author: Leader = 'name': 'Yang Zhou', 'age': 30 author['age'] = 31 # Allowed author['name'] = 'Yang' # Type error: 'name' is read-only python 313 release notes verified
The exceptions are applications specifically compiled with --disable-gil and carefully written to leverage multi-threaded parallelism. Such applications may see substantial speedups on CPU-bound workloads, at the cost of increased complexity and potential stability risks. For single-threaded or I/O-bound applications, the 3.13 change set offers no meaningful performance improvement.
movie: Movie = "title": "Inception", "year": 2010 movie["year"] = 2011 # OK movie["title"] = "Interstellar" # Type checker error (mypy/pyright with 3.13 support)
The JIT is not enabled by default. You must compile CPython from source with the --enable-experimental-jit flag. Even then, it only compiles relatively small parts of the interpreter's bytecode dispatch loop. Free-threaded CPython represents a major milestone in the
In previous Python versions, locals() inside a function would reflect the local namespace, but modifications might not always affect the function’s actual scope. In Python 3.13, the behavior has been .
: New keyboard shortcuts include F1 for help, F2 for history browsing, and F3 for a dedicated "paste mode". 2. Smarter Error Messages
Behind the scenes, a memory optimization quietly reduces Python's memory footprint. Docstrings now have their leading indentation automatically stripped during compilation. While most tools already handled this, the change reduces both runtime memory usage and the size of .pyc bytecode cache files. For applications with extensive documentation strings, the cumulative savings are non-trivial. Such applications may see substantial speedups on CPU-bound
To experiment with this feature, developers must build Python from source using the --enable-experimental-jit configuration flag. While the immediate execution speed gains for standard code paths remain modest, this architectural framework sets the stage for massive performance leaps in future iterations like Python 3.14. What's New In Python 3.13 — Python 3.14.5 documentation
What is the actual speed improvement for regular code (without the experimental JIT)? The Python core team publishes the pyperformance benchmark suite. Verified results from Python 3.13 vs 3.12:
The asyncio speedup comes from replacing many PyObject calls with direct C struct access. The changes are backported from an internal Meta optimization.
PEP 703 – Making the Global Interpreter Lock Optional (Experimental)
The dbm module now features a dbm.sqlite3 backend, which is used by default for creating new files.