~/talk

Performance Improvement of Ruby 2.7 JIT in Real World

Talkat RailsConf 2019 · 2019-05-01..05-03· [ruby]
slides:none on file

Ruby 2.6 JIT speeds microbenchmarks like Optcarrot but slows real Rails workloads; Ruby 2.7 targets Rails-specific fixes. Experiments show linking many .o into one .so and disabling speculative inline-cache optimizations reduce overhead; profile‑guided optimization brings little gain. Measured hotspots are 12M calls 3M JIT 2M cancels, VM/method-call overhead ~40%, and object allocation ~9%. Proof‑of‑concept stack allocation and Ruby‑redefined core methods cut allocation and call overheads, but scaffold benchmarks remain not yet faster than VM.

AI-written summary · about

  1. 0:00Performance Improvement of Ruby 2.7 JIT in Real World
  2. 1:17What's "MJIT"?
  3. 4:27Ruby 2.6 JIT stability
  4. 5:14Ruby 3x3 benchmark: 1. Optcarrot
  5. 6:42What's "real world"?
  6. 7:00Ruby 3x3 benchmark: 2. Discourse
  7. 9:31Discourse: Speed
  8. 10:39Why JIT is not fast yet on Rails?
  9. 11:18New Ruby benchmark: Railsbench
  10. 11:49Railsbench: Speed
  11. 12:23Railsbench: Memory
  12. 13:52Ruby 2.7 JIT Performance Challenges
  13. 16:29Approach 1: Profile-guided Optimization
  14. 17:55Can we avoid making things slow?
  15. 18:25Approach 2: Optimization Prediction
  16. 22:52JIT calls may be cancelled frequently
  17. 26:30Deoptimized Recompilation
  18. 28:10Method call is slow
  19. 32:10Solution 4: Frame-omitted Method Inlining
  20. 33:28Object allocation is slow
  21. 34:09Stack-based Object Allocation
  22. 37:22More Ruby code in core
  23. 38:18Conclusion
~/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.