Talk Python To Me

#512: Building a JIT Compiler for CPython

32 snips
Jul 2, 2025
Join Brandt Bucher, a Python core developer at Microsoft, as he dives deep into the development of a JIT compiler for CPython. Discover how this initiative differs from JITs in languages like C# and Java. The conversation highlights recent performance advancements and the delicate balance between speed and memory efficiency. Brandt discusses integer performance optimizations, error tracking with Sentry, and the collaborative dynamics between the JIT compiler and the adaptive interpreter, all crucial for modern Python's evolution.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Python's 50% Speed Improvement

  • Python has become about 50% faster in four years without any code changes from users.
  • Upgrading Python versions transparently improves performance and reduces cloud costs.
INSIGHT

Instance Dictionaries Optimization

  • Recent Python versions optimize instance dictionaries by using slots instead of full dictionaries when possible.
  • This reduces memory use and improves cache locality for attribute access.
INSIGHT

JIT Available Off By Default

  • Python 3.13 and 3.14 offer an optional JIT compiler that can be enabled with an environment variable.
  • The JIT works across major platforms and is off by default for stability and testing.
Get the Snipd Podcast app to discover more snips from this episode
Get the app