20 Ruby Performance Tips

A lot of bloggers and technologists like to talk about Ruby as if it can’t perform on-par with other dynamic/interpreted programming languages; however, these critics tend to rely on specific benchmarking techniques and ignore the overall performance profile of the language.  They also tend not to take into consideration the various factors of their choice of libraries and application architecture before blasting Ruby as being non-performant.

Ruby’s various versions and implementations have different performance profiles also and this must be taken into consideration before a decision can be made definitively about Ruby’s overall performance.  Benchmarking is a flawed means of determining the real performance of a tool because it relies too heavily on the system configuration on which the tests are ran and what activity is occurring on the system during test runs.

Benchmarks and Ruby-haters not-withstanding you can get good performance from your Ruby applications by following a few simple guidelines.  Some of the guidelines are just good programming techniques in general and others are specific to addressing issues in the Ruby language and it’s associated libraries.  Performance gains achievable through the implementation of these tips and tricks can range from minimal to breathtaking.

 

Related Articles:

http://www.monitis.com/blog/20-ruby-performance-tips/