O'Reilly logo

Addison-Wesley Professional Ruby Series Writing Efficient Ruby Code by Dr. Stefan Kaes

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

Chapter . Introduction

In this short cut, I list a number of coding patterns that are useful when trying to get maximum speed out of performance-critical sections of code. In addition, I list anti-patterns, that is, coding idioms which should be avoided in performance-sensitive code sections, and show how to transform such code to make it more efficient.

I extracted most of the patterns from my work on improving the performance of the Rails core and my regular Rails performance consulting work, but I can hardly claim that they are original in the sense that no one else has written about similar topics before. The patterns are largely nonalgorithmic, detailing local code transformations to achieve identical results with slightly different (and faster) ...

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