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.
juanfra684
says:The SVN repository of ruby http://www.ruby-lang.org/en/community/ruby-core/ .
You mistake ruby for RoR, the last version of ruby are 1.8 and 1.9 (development version) and the last version of RoR is 2.1.
Regards 🙂
Tim Groeneveld
says:Barry, it works OK for me. For more info, see http://eigenclass.org/hiki/Changes-in-Ruby-1.9-update-6 and http://eigenclass.org/hiki/non-synthetic-benchmarks-for-yarv 🙂
Barry
says:I thought that Rails wasn’t yet fully compatible with Ruby 1.9? Has that been fixed?