Joy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
summary
Meta‑tracing JIT frameworks like RPython and Graal/Truffle generate not just VM compilers but alternate VM behaviors by changing interpreter semantics: the talk shows concrete recipes for method compilation, threaded code generation, inline caching and multi‑tier JIT switching via user‑level profiling. A two‑level Smalltalk subset (base ~16k LOC) is implemented; startup improves ~15% and peak slows only ~5%. For staged code, converting stages to lambda closures lets tracing eliminate indirect calls, matching or beating MetaOCaml (20× speed of naive staging) while avoiding an ~80 ms offline compile step.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:05Partial evaluation to meta-tracing JIT
- 5:48Meta-JIT frameworks
- 8:39RPython’s meta-tracing JIT
- 13:28Beyond compilation with meta-tracing
- 17:47Method compilation tweaks
- 18:50Threaded code generation
- 19:55Inline caching optimization
- 23:28Multi-tier compilation in RPython
- 26:20Smalltalk-like VM with RPython
- 28:54Meta-tracing as VM engine
- 29:35Meta-tracing for multi-stage programming
- 33:32Lambda closures and dynamic JIT
- 34:13Summary and future
- 35:36Q&A
related talks
45mTwo-level Just-in-Time Compilation with One Interpreter and One Engine
48mOne VM To Rule Them All
15mAmalgamating Different JIT Compilations in a Meta-tracing JIT Compiler Framework
31mSimplifying and Optimizing Life on the Edge with Graal
19mReusing Just-in-Time Compiled Code
38mGraal
17mAST vs. Bytecode: Interpreters in the Age of Meta-Compilation
15mTracing Just-in-time Compilation for Effects and Handlers
