~/talk

High Performance Ruby

Talkat RubyConf AU 2013 · 2013-02-20..02-22· [ruby]
slides:none on file

Shows concrete wins: running JRuby on JVM plus invokeDynamic turns dynamic calls into inlines and yields about an 800% improvement over early JRuby and roughly 3x performance gains from JVM upgrades alone. Identifies exact pain points — eval, singletons/extend and constant redefinition blow caches; ObjectSpace bookkeeping triggers massive GC — and concrete fixes: precreate classes, freeze constants, avoid chained allocations, use persistent structures (Hamster). Real benchmarks include base64, richards, neural network, mandelbrot and a red‑black tree where pure‑Ruby runs ~3.96s.

AI-written summary · about

  1. 0:00Start
  2. 1:39Optimize What?
  3. 2:42Ahh, Benchmarks
  4. 3:34Versus Python?
  5. 4:06Clojure?
  6. 4:31JavaScript?
  7. 4:53Maybe Java?
  8. 5:05Hell, just write it in C!
  9. 6:17Unnecessary Work
  10. 8:23Why Things Run Slow
  11. 9:40Two Key Areas
  12. 11:15Method Caching
  13. 12:07Inlining
  14. 12:23Inline foo into invoker
  15. 12:39Inline invoker into loop
  16. 12:51Value is transient
  17. 13:04Loop does nothing
  18. 13:37Cache Busting
  19. 15:18Dynamic Invocation
  20. 17:43Fixing eval
  21. 19:48Object#extend
  22. 21:22Fixing Singletons/ #extend
  23. 23:49Constant Lookup
  24. 24:15Cache Invalidation
  25. 25:00Cache-Busting
  26. 26:18Fixing Constants
  27. 27:11Ruby Loves Objects
  28. 27:42Culprits
  29. 28:33Fixing Literals
  30. 29:38Fixing Concat/Copy
  31. 30:09Fixing Enum Chaining
  32. 30:56Case Study: JRuby
  33. 32:02Leverage the JVM
  34. 33:04ObjectSpace
  35. 34:35Performance
  36. 34:49InvokeDynamic
  37. 37:00smooth_sort
  38. 38:02rbtree Extension
  39. 40:11The Lesson
~/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.