How to optimize Ruby internal.
summary
Uses Apple Instruments and the Xcode iProfiler to find C-level hot spots, then removes Ruby dispatch by adding C APIs and reducing temporary allocations; patches target Ruby 2.5 internals and land as PRs. Measured across ~500 benchmark cases for Array/Hash/String/Time, hash merge 1.5x faster after replacing a duplication path, and object allocation 1.46x faster by coalescing heap allocations; some regressions (≈40% hash-gen) appear but are identified and fixed.
AI-written summary · about
chapters (7)
- 0:00Introduction and background
- 6:45Measuring Ruby performance
- 12:15Optimizing Ruby internals
- 18:59Performance results and regressions
- 23:27Hash object creation optimization
- 24:35Summary and conclusion
- 25:18Q&A session
related talks
29mHow to Performance
24mRuby Performance Secrets and How to Uncover Them
38mFinding a needle in the haystack - Debugging performance issues
41mPerformance Improvement of Ruby 2.7 JIT in Real World
53mWriting Fast Ruby
39mPointers for Eliminating Heaps of Memory
18mPerformance Optimization in Ruby
29mTidying Active Record Allocations
