~/talk

How are Method Calls Formed?

Talkat BathRuby 2016 · on Friday, 2016-03-11· [ruby]
slides:none on file

Shows how Ruby resolves method calls from bytecode into C and claims a speedup by adding a polymorphic inline cache. Implements the cache as a short array (an 186 line diff), instruments MRI with a TracePoint logger and runs real workloads (1,600 requests producing ~4 million calls). Benchmarks show microbenchmarks improve but the production trace reveals most call sites are monomorphic so the patch yields little net benefit; discovers RSpec and EventMachine patterns that cause cache churn.

AI-written summary · about

  1. 0:00Introduction
  2. 7:58Method call sites in Ruby
  3. 13:40Ruby VM executes method calls
  4. 18:54Method lookup and inheritance
  5. 21:42Speeding up with inline caching
  6. 23:29Breaking method caches
  7. 27:24Detecting cache misses with stats
  8. 30:18Cache breaks and Singleton classes
  9. 33:10Polymorphic calls and performance
  10. 36:20Polymorphic inline caches
  11. 37:46Measuring optimization impact
  12. 40:52Analyzing call sites in production
  13. 45:51Lessons learned
~/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.