Python 3.14, due out later this yr, is about to obtain a brand new kind of interpreter that may enhance efficiency by as much as 30% with no modifications to current code.
The CPython 3.14 change log describes the characteristic as “a brand new kind of interpreter primarily based on tail calls.” This description could also be slightly deceptive for individuals who don’t carefully observe inside Python growth work. “Tail calls” doesn’t imply that CPython, or the Python language, will now assist tail name optimization. It refers to an optimization {that a} C compiler performs on the CPython code, which accelerates the way in which the interpreter dispatches its bytecode directions.
No modifications to current Python code are required, and C extension modules for CPython don’t must be recompiled both, as there are not any modifications to the CPython APIs or ABIs. Nor does the brand new interpreter add important upkeep overhead to CPython, because it’s been carried out primarily by repurposing current code.