Python 3.11 Performance Benchmarks Are Looking Fantastic
Last month Python 3.11 Beta 1 was released as their first preview of this major update to the Python programming language. Besides new language features and other improvements, Python 3.11 performance is looking fantastic with very nice performance uplift over prior Python 3.x releases.
Python 3.11 has been baking support for task groups in asyncio, fine-grained error locations in tracebacks, the self-type to return an instance of their class, TypeVarTuple for variadic generics, and various other features.
Besides changes affecting the Python language itself, Python 3.11 has been landing performance work from the "Faster CPython Project" to speed-up the reference implementation. Python 3.11 is 10~60% faster than Python 3.10 according to the official figures and a 1.22x speed-up with their standard benchmark suite.
The Python Docs cover some of the significant performance improvements made for this upcoming release.
The formal Python 3.11.0 release isn't expected until October while multiple betas will come through July and then at least two release candidates in the following months before early October.
Recently on an AMD Ryzen 9 5950X developer box I recently carried out some benchmarks looking at the performance of last month's Python 3.11 Beta 1 (the latest development release at the time of testing). The Python 3.11 Beta performance was compared to earlier releases including Python 3.10.4, Python 3.9.13, and Python 3.8.13. All of these Python releases were built from source in the same release configuration each time on this same system. A variety of different Python benchmarks were then carried out for seeing how Python 3.11 is looking compared to the prior Python releases.