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

Here’s what you learned during this profiling session:

  • Optimization with the profiler is a craft, not engineering.

    You must look at the data, make your best guess at what’s slow, change the code, reprofile, and see whether your optimization worked. Rinse and repeat. The best way to learn this craft is by doing it. The more you profile, the better you understand the results you get, and the better optimization guesses you make.

  • Write tests before profiling.

    You’ll change the code a lot during profiling. Tests are your only way to ensure the program still does what it’s supposed to do.

  • The profiler will tell you what to optimize or where to concentrate your optimization effort.

    In our profiling session example, the profiler ...

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