~/talk

Fast Metaprogramming with Truffle

Talkat RubyKaigi 2015 · 2015-12-11..12-13· [ruby]
slides:none on file

Claims that JRuby+Truffle removes most metaprogramming overhead by using localized caching and dispatch chains to turn send, instance_variable_get/set and method_missing into direct calls. Microbenchmarks show ~4x faster method calls, ~5x faster ivar ops and ~10x faster method_missing versus MRI; a larger benchmark (pdf processing) runs ~33x faster. Implementation pulls JRuby and Rubinius code, hits ~90% core lib, ~92% language spec and ~99% ActiveSupport tests, and the technique deoptimizes and falls back when call sites go megamorphic.

AI-written summary · about

  1. 0:00Introduction and disclaimer
  2. 0:47What is Truffle framework
  3. 3:59Metaprogramming in Ruby
  4. 5:49Performance and elegance in Ruby
  5. 6:52Metaprogramming microbenchmarks
  6. 8:17Truffle eliminates metaprogramming overhead
  7. 9:21Frequency of metaprogramming calls
  8. 13:15JRuby+Truffle performance gains
  9. 14:21Ruby method lookup basics
  10. 18:52Inline caching in Ruby
  11. 21:00Dispatch chains for metaprogramming
  12. 24:18Method sharing and caching
  13. 25:46Making metaprogramming fast
  14. 27:13Research and implementation
  15. 27:58Q&A on dispatch chains
~/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.