A good friend of mine, Jordan Bracco recently forced me to rediscover Ruby on Rails. He told me that the new version, 1.9 is “5000x faster”, so I thought, well, why not!
The last version of Ruby I tried was either version 1.7 or 1.8, and it was not really something that I would say rocked my boat. It was slow, and just plain did not do (at that time what I though) I wanted.
Me being a version freak – and a speed freak, decided that I would go to the Ruby, check out their CVS repository out (seriously, these guys need to update to mercurial, just like Mozilla has!) and compiled Ruby’s latest trunk version.
The speed speaks for it’s self. A basic “Hello World” Ruby on Rails app does 700 requests a second, while a basic “Hello World” in PHP does 800. For this use case, yes, PHP is faster, but what you have to remember is that Ruby on Rails is much, much, much more sophisticated in terms of functionality.
I recently rewrote a page that is on ShareSource.org, and it is almost twice as fast. The difference here, is that the Ruby rewrite had no cache. Every single hit with Apache benchmark was generated on demand, while the PHP version of the ShareSource.org page in question was kept in cache for five minutes.
Aaaahhh, I am loving Ruby already.