Evaluating Ruby

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.

2 Responses to “Evaluating Ruby”

  1. Aníbal Rojas Says:

    The main point is that CPU is always going cheaper, good developers are expensive. I am just starting the process of learning Ruby and Rails after a LOT of years of J2EE development, and I am loving it.

  2. DigitalHobbit Says:

    Yes, same here. :)

    I agree that in most cases it is probably worth spending a bit more money to get more or better CPUs if it saves development (and maintenance) costs. On the other hand I suppose that there are examples of high profile sites (Amazon, Google, or Yahoo come to mind) that need to be highly optimized. In these cases I am sure every bit of optimization counts, and buying a few thousand extra servers is probably prohibitive… But for most enterprise applications, where a little bit of linear overhead won’t have a huge affect on the scalability of the application, I am sure the benefits of using Ruby would be well worth it.

Leave a Reply