Evaluating Ruby

September 17, 2005

Pragmatic Programmer Dave Thomas (aka PragDave) has started a new series of articles about comparing Ruby to other languages.

The first article looks at one of the biggest perceived issues, performance. As usual Dave is pragmatic and points out that Ruby is not always the best choice. In most cases however, the relatively small linear performance loss of Ruby compared to, say, J2EE, is negligible when you consider that for a typical enterprise application that does some data shuffling and maybe some basic arithmetic operations, only a small fraction of time (he estimates 5%) is actually spent in code that you write, while the rest of the time is spent on data transfer, database operations (possibly using some kind of object/relational mapping framework), etc. Furthermore, the expressiveness of Ruby often allows programmers to write cleaner, more efficient algorithms. The potential gains from a more efficient algorithm can far outweigh the small linear loss of using a slower language.