pythonperformancepython-3.11

How exactly does Python 3.11 offer a speedup from Python 3.10?


I am wondering if the 10-60% speedup over Python 3.10 is solely due to the reference implementation of CPython 3.11 being faster than CPython 3.10 in Python 3.10 or also in part due to other new features?

How does one analyze such performance speedups?


Solution

  • I can't explain it any better than the people responsible for the "Faster CPython" project explain it themselves. If you want to know the plans to speed up Python you have a lot of information typing those particular words in Google.

    Here you are some links.

    This is the specification of what has been done in this version. In the page there are many links to Github where you can read the discussions of the core developers about each specific modification: https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-faster-cpython

    This is a talk in English by Mark Shannon in which he explains the developments till now. https://www.youtube.com/watch?v=xKk7IXm0XO0

    If you are lucky enough to speak Spanish this is a talk from 2022 PyCon Spain in which Pablo Galindo Salgado explains very didactically what has been done in this version and what is to come. https://www.youtube.com/watch?v=94jLt3CX5Dc

    Finally, I add a link to the famous show "The Real Python Podcast" in which the same Pablo Galindo Salgado talks a bit about it (although the program is not specifically dedicated to Faster CPython). https://www.youtube.com/watch?v=NFrbbOf-_2U