"300x faster ruby"
summary
A spell‑checking Ruby gem is profiled and benchmarked with ruby-prof, rb-spy and benchmark (and plain Unix time) to find real bottlenecks. Changes include algorithm swaps (binary search), memoization, avoiding unnecessary filesystem calls, replacing slow regex/method patterns, and optional parallelization and Ruby upgrades. Result: prototype that took 1m20s on 29 files is reduced to a few hundred milliseconds for itself and a few seconds to check ~6,000 files — claimed ~300× overall improvement.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:58Title
- 2:14Lint
- 3:58Speed
- 5:04Writing ruby fast
- 6:30Premeasure optimisation
- 9:28Ruby profe
- 12:27Benchmarking
- 13:06Benchmark IPS
- 18:16How to optimize code
- 19:09Sometimes faster is better
- 24:01Narrow methods
- 27:06Avoid unused work
- 30:41Validation
- 34:48Parallelization
- 36:44Parallel Jam
- 37:36Conclusion








