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

We saw in this chapter that there are only three things that you need to consider to make your Ruby code faster:

  • Optimize memory by avoiding extra allocations and memory leaks.

  • Write faster iterators that take both less time and memory.

  • And finally, write less Ruby code by letting specialized tools do their job.

The beauty of these techniques is that you can apply them to any Ruby program to make it up to ten times faster. But the majority of the Ruby developers are writing Rails applications, so it’s now time to dive deeper and apply our optimization techniques to Ruby on Rails.

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