Performance Optimization in Ruby
summary
Optimizations on a real concurrency library, Celluloid, produce concrete results: about 300% speedup on hot paths after targeted fixes. The workflow uses measurable steps — Benchmark IPS to quantify ops/sec, profiler dumps plus RubyProf and KCacheGrind to find CPU hotspots, ObjectSpace diffs for allocation leaks, and cross-implementation comparison (MRI, JRuby, Rubinius) to pick the fastest VM. Examples include a pooled-worker benchmark, identified slow methods, implemented changes, and repeatable benchmarks that confirm the gains.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 2:18What is Performance Optimization
- 3:10Have a Benchmarking Suite
- 5:28Upgrade your Ruby
- 7:48Try another implementation
- 9:20Profile methods
- 9:41bottleneck
- 10:21multithreading
- 11:20other tools
- 16:55Wrap up








