~/talk

Lightning-Fast Method Calls with Ruby 4.1 ZJIT

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [ruby]
slides:none on file

Proposes replacing per-call frame writes with driver frames in ZJIT, collapsing ~10–40 memory writes down to three by lazy-materializing frame metadata and repurposing the G_return slot. Prototype lives in ZJIT, uses a rewritten register allocator and is profiled with Linux perf on Rails benchmarks. Early results show ~2% end-to-end Rails speedup and ~5% on microbenchmarks, with a possible ~10% cycle reduction for JIT code; PC/IC protocol is implemented but stack and local-slot materialization remain unfinished and many side exits still hurt performance.

AI-written summary · about

  1. 0:00Introduction to Ruby JIT
  2. 1:05What is Ruby JIT
  3. 3:54ZJIT vs YJIT performance
  4. 5:38Method call bottlenecks
  5. 9:52YJIT method call optimization
  6. 13:25ZJIT method call design
  7. 17:20Why stack writes are needed
  8. 20:27Introducing driver frames
  9. 23:14Challenges with driver frames
  10. 25:46Performance impact of driver frames
  11. 26:48Method inlining and future work
  12. 27:50Conclusion and next steps
~/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.