~/talk

A tour of CPython's runtime

Talkat VMIL 2024 · on Sunday, 2024-10-20· [python]
links:none on file
slides:none on file

CPython shows concrete wins: specialization in 3.11 yields ~25% speedup, and a new tracing JIT pipeline builds micro op traces from a DSL, then uses a copy and patch strategy that compiles C templates at build time (LLVM only at build) and patches relocations into executable memory. Early results: the micro-op interpreter is ~20% slower, but JITting those ops returns parity with baseline; tracing coverage rises from ~6% to ~65% (target ~91%), and initial memory overhead falls from ~+10% toward much smaller numbers.

AI-written summary · about

  1. 0:00CPython runtime optimization intro
  2. 2:31What makes Python hard to optimize
  3. 4:59CPython architecture and constraints
  4. 6:22Dynamic languages with JIT compilation
  5. 7:25Fibonacci execution with specialization
  6. 11:57Micro-op traces and JIT compiler
  7. 15:23Optimizing micro-op traces
  8. 18:10Micro-op interpreter overhead challenges
  9. 19:14Copy-and-patch compilation for JIT
  10. 23:25How copy-and-patch works
  11. 29:41Platform support and complexity
  12. 30:45JIT performance and memory overhead
  13. 33:31Future stack caching and register allocation
  14. 38:26Trace stitching and side-exit optimizations
  15. 43:58CPython performance engineering efforts
  16. 47:26Q&A on JIT performance
  17. 58:53JIT security and ecosystem
  18. 1:00:16Benchmarking pure Python impact
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.