Implementation Details of Ruby 2.0 VM
summary
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
chapters (13)
- 0:00Ruby 2.0 VM intro
- 1:10Speaker intro and overview
- 4:54Interpreter lecture review
- 9:19Method dispatch process
- 14:16Quiz on method dispatch
- 15:27Ruby method types and dispatch
- 17:17VM registers and optimization
- 21:43Dispatch overhead and homework
- 22:05Optimizing method dispatch
- 29:49Ruby 2.0 performance
- 33:13Additional Ruby 2.0 optimizations
- 37:15Ruby 2.0 timeline and future
- 39:44Conclusion and challenges








