O'Reilly logo

Ruby Performance Optimization by Alexander Dymo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Takeaways

There’s only one way to prove that the optimization worked. You measure the performance before and after, and you compare. But the devil is in the details. Here’s what you need to take care of to get the measurements right.

  1. Minimize external factors to increase measurement accuracy.

  2. Make sure that GC behaves as predictably as possible to decrease variability in measurements.

  3. Take as many measurements as practical to make statistical analysis possible. A good default is 30.

  4. Compare before and after numbers by calculating the confidence interval of the optimization effect. Conclude that optimization worked only when the lower bound of the confidence interval is higher than 0.

  5. Try to reduce dispersion in measurements as much ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required