Python 3.11 Performance Benchmarks Show Huge Improvement

Written by Michael Larabel in Computers on 25 October 2022. Page 1 of 3. 53 Comments

While this summer I ran some early Python 3.11 benchmarks using the development state at the time, given yesterday's Python 3.11 release I ran some fresh performance tests of the official Python 3.11 version against prior Python 3 releases.

Similar to the earlier Python 3.11 development benchmarks, Python 3.11 is a huge improvement in the performance department over earlier versions of CPython. Thanks to the work of the "Faster CPython Project", Python 3.11 has some dramatic performance improvements over Python 3.10 and prior.

The Python 3.11 release announcement cites 10~60% improvements over Python 3.10 and a 1.22x speed-up for its standard benchmark suite.

Using the official Python 3.11.0 sources from yesterday, the Python performance was compared to 3.10.6, 3.9.15, and 3.8.15. All of the Python releases were built from source in release mode and with LTO optimizations while using GCC 12 and the other stock components of Ubuntu 22.10 LTS. All of the Python benchmarks were repeated in the same manner from an AMD Ryzen 9 5950X developer workstation.

Jiving with the Python upstream expectations and from my early benchmarks a few months ago, the Python 3.11 performance is showing huge uplift over prior Python releases:

As shown by benchmarking back to Python 3.8, there isn't normally too much variation in the performance department between CPython releases. But with Python 3.11 it's a big change for increasing the performance and making this de facto Python implementation more competitive to the likes of Pyston and PyPy.

Related Articles