LLVM-based JIT compiler for MRI byTakashi Kokubun
summary
Experiment builds an LLVM-based JIT for MRI that compiles YARV ISeq to LLVM IR or generates C and produces .so via Clang, uses inlining and LICM, runs compilation in a background thread with fallback to bytecode, skips setjmp, and leverages precompiled VM headers. LLRB hits 5× faster with LLRB while MJIT and YARV-MJIT reach roughly 2–3× speedups, YARV-MJIT avoids changing VM instructions and passes core tests so it actually works and is safe to try.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:36What is JIT
- 6:00Why JIT
- 9:24Implementations
- 10:28Motivation
- 16:21Image
- 25:50Optimizations
related talks
20mBYOJ: Build your own JIT with Ruby
30mYJIT - Building a new JIT Compiler inside CRuby
32mExperiments in sharing Java VM technology with CRuby
36mSome Assembly Required
20mEvaluating YJIT’s Performance in a Production Context: A Pragmatic Approach
37mKeynote: YJIT's Three Languages: the Fun of Code that Writes Code
39mInside Ruby's VM: The TMI Edition.
27mLooking Into Peephole Optimizations
