~/talk

How Are Method Calls Formed?

Talkat MountainWest RubyConf 2016 · 2016-03-21..03-22· [ruby]
slides:none on file

Claims a polymorphic inline caches patch that adds ~186 lines to MRI, instruments bytecode with tracepoints and Ruby vmstat, and measures against a large Rails app with 4 million calls. Results show most call sites are monomorphic so speedups are negligible; one hotspot sees 16,000 types (eventmachine/thin causing singleton classes). Fixes include changing arrays to sets to restore monomorphism. Conclusion: optimization is workload specific and often not worth landing.

AI-written summary · about

  1. 0:00Start
  2. 9:00Methods
  3. 11:54Call Site Example
  4. 14:39Stack Based
  5. 16:05High Level
  6. 16:22Method Call Byte Code
  7. 16:50Method Byte Code
  8. 19:22Finding the Method
  9. 21:46Benchmark Bytecode
  10. 23:42Bytecode Verification
  11. 24:15Call Sites (cache locations)
  12. 24:44Cache key / value
  13. 26:36Breaking the cache
  14. 28:24Runtime Breakage
  15. 29:20What is this an instance of?
  16. 30:40Singleton Class Access
  17. 31:14Cache Misses
  18. 32:17Polymorphic Test
  19. 35:20Patch
  20. 35:52Mission Accomplished!
  21. 37:37Method Cache logging
  22. 37:52Logging Test
  23. 38:39Output
  24. 44:23Performance
  25. 45:08Behavior
~/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.