
core.py Episode 13: A Legit Episode
7 snips
Jun 29, 2024 In this discussion, Brandt Bucher, a core developer involved in Python's PEP work, shares his journey through open source. He delves into the intricacies of pattern matching, the quirks of decorators, and his experiences with the Faster Python team. Brandt reveals unconventional insights about JIT compilation and the infamous n-body benchmark. Expect humorous anecdotes on debugging, the challenges posed by the Global Interpreter Lock, and the difficulties of naming things in programming. The conversation emphasizes community collaboration and the future of Python's performance enhancements.
AI Snips
Chapters
Transcript
Episode notes
JIT Compiles From Runtime Observations
- Brandt explains the JIT compiles after observing runtime behaviour instead of ahead-of-time.
- This lets the compiler assume concrete types and emit native code tailored to actual execution.
Copy-And-Patch Cuts Compilation Cost
- Brandt highlights copy-and-patch uses precompiled machine-code templates and only tiny fixups.
- That design keeps compilation fast and avoids long JIT pauses.
Interpreter Is A Major Cost
- Brandt's profiling shows roughly a third of benchmark runtime sits in the interpreter without the JIT.
- That limits maximum speedups even if interpreter overhead were eliminated.
