~/talk

The Method JIT Compiler for Ruby 2.6

Talkat RubyKaigi 2018 · 2018-05-31..06-02· [ruby, compilers-and-language-design]
slides:none on file

Method JIT for Ruby 2.6 compiles hot bytecode by translating YARV bytecode to C functions, invoking gcc/clang and loading them with bytecode-to-C with dlopen, running compilation on a worker thread while VM execution continues. Microbenchmarks show up to ~2× speed (some older LLVM tests hit ~5–7×), but real Rails workloads slow due to extra overheads: ~0.1 ms compile latency, lots of method-image mmap pages and I-cache stalls that increase cycles, frequent method-cache invalidations and longjmp effects. Workarounds implemented (compile-stop, fewer mmaps, inline +/arithmetic) reduce regressions but full inlining remains a work in progress.

AI-written summary · about

  1. 0:00Introduction
  2. 2:01JIT compiler basics
  3. 11:23Performance issues with JIT
  4. 17:47Native method optimization
  5. 26:20Inline method optimization
  6. 32:21Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.