How we are making Python 3.11 faster
- The Auditorium
- Start (Dublin time):
- Start (your time):
- 30 minutes
Python 3.11 is between 10% and 60% faster than Python 3.10, depending on the application. We have achieved this in a fully portable way by making the interpreter adapt to the program being run, and by streamlining key data structures.
In this talk I will explain what changes we have made, and how they improve performance.
The "Faster CPython" project aims to speed up Python, specifically CPython, by a large factor over the next few releases. The first release to see the benefits of this work is Python 3.11.
Python 3.11 includes the following major changes:
- Adaptive specializing interpreter (PEP 659)
- Consecutively allocated execution frames
- Zero cost try-except
- More regular object layout
- Lazily created object dictionaries.
I will describe each of these, describing how each helps speed up Python, and how they interact with each other.
I will end the talk with some possible directions for Python 3.12.