We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Python 3.14, due out later this year, is set to receive a new type of interpreter that can boost performance by up to 30% with no changes to existing code.
The CPython 3.14 change log describes the feature as “a new type of interpreter based on tail calls.” This description may be a little misleading for those who don’t closely follow internal Python development work. “Tail calls” doesn’t mean that CPython, or the Python language, will now support tail call optimization. It refers to an optimization that a C compiler performs on the CPython code, which speeds up the way the interpreter dispatches its bytecode instructions.
No changes to existing Python code are required, and C extension modules for CPython don’t need to be recompiled either, as there are no changes to the CPython APIs or ABIs. Nor does the new interpreter add significant maintenance overhead to CPython, as it’s been implemented mainly by repurposing existing code.
For those who use prebuilt CPython binaries, the new interpreter build should be included as part of the upgrade process to Python 3.14. If you build CPython from source, though, using this feature will require a specific compilation flag for the CPython build process (
--with-tail-call-interp
).Most crucially, the new interpreter requires using a C compiler that supports the tail call optimization. Not all C compilers provide such support. However, as of this writing, the compilation process is supported on MSVC and on Clang 19 or better (on x86-64 and AArch64 architectures). It is expected to be added to GCC as well.
continue reading on www.infoworld.com
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.