~/talk

Implementation Details of Ruby 2.0 VM

Talkat RubyConf 2012 · 2012-11-01..11-03· [ruby, compilers-and-language-design]
slides:none on file

Ruby 2.0 rewrites VM data structures and method dispatch to cut overhead: it adds specialized instructions for hot ops (e.g. Fixnum#+), implements a two-tier inline method cache plus global cache and caches visibility/arity checks, and introduces frameless C-function methods to avoid building frames. Register count drops from 11 toward 10 and a control-frame layout reduces per-call state. Microbenchmarks show ~40–50% speedups on simple send, ~15% typical method-dispatch gains and ~20% on some apps; some servers see no change.

AI-written summary · about

  1. 0:00Ruby 2.0 VM intro
  2. 1:10Speaker intro and overview
  3. 4:54Interpreter lecture review
  4. 9:19Method dispatch process
  5. 14:16Quiz on method dispatch
  6. 15:27Ruby method types and dispatch
  7. 17:17VM registers and optimization
  8. 21:43Dispatch overhead and homework
  9. 22:05Optimizing method dispatch
  10. 29:49Ruby 2.0 performance
  11. 33:13Additional Ruby 2.0 optimizations
  12. 37:15Ruby 2.0 timeline and future
  13. 39:44Conclusion and challenges
~/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.