PyCon JP 2024

Your locale preferences have been saved. We like to think that we have excellent support for English in pretalx, but if you encounter issues or errors, please contact us!

An overview of the optimisation pipeline in CPython 3.13 and onwards
2024-09-27 , 4F Track4

CPython 3.13 introduces a new experimental optimization pipeline that cumulates into a JIT. This talk gives an overview of the components of the optimization pipeline as of CPython 3.13 and plans for future versions of CPython.

The talk will focus on the Trace Optimizer and briefly cover experiments the speaker is personally involved in before the final version currently in CPython 3.13 implemented by Ken Jin.

You don’t have to be a compiler or CPython expert to attend – this talk aims to be accessible and self-contained so hopefully, everybody can gain something from it.


Why did you choose this topic?

I (Jules Poon) was involved in experiments for the optimizer with Ken Jin for much of 2023, even before much of the Tier 2 "micro-ops" were finalised and the role of the "optimizer" was yet to be solidified. In 2024, Ken Jin rewrote and simplified the optimizer two more times, the final version of which made it into CPython 3.13.

I chose this topic because it is in some sense, the conclusion of the project I was involved in with Ken Jin.

Knowledges and know-how the audience can get from your talk
  • General understanding of how CPython interprets Python source.
  • General understanding of CPython's bytecode interpreter
  • CPython's Specialising Interpreter (Tier 1, CPython 3.11)
  • CPython's new optimisation pipeline (Tier 2, CPython 3.13 and beyond)
Prior knowledges speakers assume the audience to have
  • Some knowledge of Python (this talk will only cover simple examples)
Audience experiment

Beginner

Language of presentation

English

Language of presentation material

English

See also: Slides and script