ZJIT: Building a Next Generation Ruby JIT
summary
ZJIT is a method‑based Ruby JIT that replaces direct YARV→machine code emission with an SSA‑based IR and modular compiler passes; after 2.5 months it already has comparisons, control flow, type/constant propagation and dead‑code elimination. It implements fast JIT‑to‑JIT calls using CPU call/return and the C stack, yielding about 60% higher microbenchmark throughput than YJIT (YJIT is ~10x faster than the interpreter on the same test). Planed features include serializable machine code and metadata for instant warmup, upstreaming, and staged rollout toward Ruby 3.5.
AI-written summary · about
chapters (10)
- 0:00Introduction and YJIT history
- 4:32YJIT performance plateau
- 10:40Introducing ZJIT
- 12:50ZJIT core architecture
- 16:21ZJIT intermediate representation
- 20:13Fast JIT-to-JIT calls
- 23:03Serialization and reuse of compilation
- 25:34Current status and next steps
- 26:55Ruby 3.5 expectations
- 29:27Q&A and closing
related talks
28mZJIT: The future of Ruby performance
27mThe design and implementation of ZJIT & the next five years
30mYJIT - Building a new JIT Compiler inside CRuby
20mBYOJ: Build your own JIT with Ruby
17mYJIT: A Basic Block Versioning JIT Compiler
20mEvaluating YJIT’s Performance in a Production Context: A Pragmatic Approach
36mSome Assembly Required
29mLightning-Fast Method Calls with Ruby 4.1 ZJIT
