Last year, I compared Ruby 1.8.7 with Ruby 1.9.1 by running the code
I wrote to solve the MEC problem in ruby. Here I repeat the runs using more of the ruby versions
supported by RVM. Note that I put "Real World" in
quotes for a reason: this is benchmarking one script that is very much CPU bound. If your specific
solution is not CPU bound, you WILL get different results. If your test bed is not
my crappy Gateway laptop, you WILL get different results. My point is: don't get hung
up on benchmarks. All this post is saying is that one specific program runs more or less quickly
on my laptop when using different versions of the Ruby interpreter. I find comparing the time
of execution between the different versions useful. You might not.
My observations: JRuby looks very promising, especially if you let it run for a while. This gives
the JIT compiler time to kick in and really speed things up. MRI 1.9.2 looks equally promising. A
30% improvement in speed over 1.9.1. I expected more out of rubinius. Maybe rc3 will be better?
To appease the jruby folks, I reran the jruby test using some JVM flags that are supposed to
speed things up. The results are even better.
Doug Seifert: A Compendium of Stuff. Random thoughts, ramblings, code and other stuff by an experienced software engineer and architect specializing in ruby, rails and Java web and server side development.