Why Python 3.11 Is Twice as Fast as 3.10 – Inside the Shannon Plan
On January 18, 2022 the Python Software Foundation released Python 3.10, 3.9, and a preview of 3.11, detailing performance gains, Windows installer issues, and a critical Cython‑related memory leak fixed in the upcoming 3.10.3 release.
At the 2021 PyCon Python Language Summit, Guido van Rossum announced on GitHub a "Shannon Plan" aiming to increase Python's speed five‑fold within four years, with Python 3.11 targeting a two‑fold speed boost over 3.10.
On January 18, 2022 the Python Software Foundation fulfilled part of that promise by releasing three new versions: Python 3.10, 3.9, and a preview of 3.11. The core team acknowledged a rocky start to 2022 but confirmed that 3.11 runs roughly twice as fast as 3.10.
These releases introduced several issues, notably a complex code‑signing certificate update that prevented Windows installers from being bundled with 3.10.2, 3.9.1, and 3.11.0a4. Despite the missing installers, the CPython team pushed the releases because a severe memory‑leak bug in earlier versions made the 3.10.2 update strongly recommended.
Release manager Lukasz Langa explained that the team worked intensively to meet the 3.10.2 delivery schedule even without a Windows installer, and apologized for the inconvenience while promising a rapid fix.
CPython, the reference implementation of Python, experienced a series of setbacks described as "cursed" for the first three 2022 releases, but the team persisted.
Developers Ee Durbin and Steve Dower (Microsoft’s Windows specialist for CPython) are addressing the certificate problem, which the PSF expects to resolve within the week.
In addition, developers using Cython reported a memory‑leak issue in Python 3.10 that originates from certain Cython‑generated function calls. Langa noted that the leak consists of a small, constant bytecode sequence that, while subtle, can affect long‑running applications.
Core developer Pablo Galindo Salgado highlighted the severity of the leak, citing a bug where __Pyx_PyCFunction_FastCall in 3.10 leaks several megabytes of memory, necessitating an urgent fix.
Investigation pinpointed the leak to PyEval_EvalFrameEx, caused by Cython code and present only in Python 3.10 and earlier; the issue is resolved in Python 3.11 and later.
The next maintenance release, Python 3.10.3, is scheduled for April 4, 2022.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
