Skip to main content
EuroPythonCode of ConductBuy tickets

How we are making Python 3.11 faster

Room:
The Auditorium
Start:
10:20 on 14 July 2022
Duration:
30 minutes

Abstract

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.

Talk(c)Python Internals

Description

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.


The speaker

Mark Shannon

I've been using Python since 2005. I have an extensive background in compilers, virtual machines and static analysis for dynamic languages, specifically Python. After a long interlude working on static analysis tools, I have returned to performance work over the last couple of years.

I am currently working as technical lead with the "Faster CPython" team funded by Microsoft.



← Back to schedule