Comparing Ruby 1.9.1 to Ruby 1.8.7 In The Real World
Early last year, I wrote a solution to the Minimum Enclosing Circle problem in Ruby. I figured this code was "real world" enough to compare performance of Ruby 1.8.7 to Ruby 1.9.1. There are a lot of numbers flying around claiming Ruby 1.9 is anywhere from 5 - 10 times faster than 1.8.7 and I have verified this on very small code samples.
The MEC solution is more real world. Here are some benchmark numbers from running the code under both 1.8.7 and 1.9.1.
As you can see, I get anywhere from 39% - 47% better performance. Call Ruby 1.9.1 twice as fast as Ruby 1.8.7 in a real world code base. I think this is what we can expect out of real world code bases when transitioning to 1.9.1
As a side note, I am using Ruby Version Manager to switch between my system installed Ruby (1.8.7) and 1.9.1. Kudos to Wayne Seguin, author of rvm. It is a beautiful package.