Talks: CPython's Compilation Pipeline

Saturday - May 18th, 2024 3:15 p.m.-3:45 p.m. in Room 301-305

Presented by:


Over the last couple of years, CPython's compiler was refactored. In version 3.13, we will have access from Python scripts to more of the compilation stages: Instead of the old 4-stage pipeline (source --> tokens --> AST --> code object), we will have a more refined pipeline (source --> tokens --> AST --> optimized AST --> pseudo bytecode --> optimized pseudo bytecode --> bytecode --> code object).

This talk describes the new compilation pipeline of CPython 3.13 and the possibilities that it creates for CPython users, maintainers and educators. It presents Codoscope, a new vizualization tool that displays CPython's process of translating Python source code into an executable code object.