Slashdot Mirror


Comparison of Nine Ruby Implementations

An anonymous reader writes "Zen and the Art of Programming published a new version of The Great Ruby Shootout, which was aimed at testing the performances of multiple Ruby implementations. On the benchmark table this time around are Ruby 1.8 (on GNU/Linux and Windows), Ruby 1.9 (aka Yarv), Ruby Enterprise Edition (aka REE), JRuby 1.1.6RC1, Rubinius, MagLev, MacRuby 0.3 and IronRuby. The results of this comprehensive comparison show that for this set of benchmarks, Ruby 1.9.1 is almost 5 times faster than the notoriously slow Ruby 1.8. Is Ruby finally going to be acceptably fast?"

6 of 75 comments (clear)

  1. Ruby 1.9.1 and JRuby by mgkimsal2 · · Score: 2, Interesting

    Ruby 1.9.1 and JRuby seem to be the 'winners' in most tests. Have a look at the PNG here: http://antoniocangiano.com/images/shootout3/main_time.png

    I've heard a lot of good things about the JRuby project, and this test seems to demonstrate that it's probably the closest in terms of speed to the standard Ruby (canonical Ruby?)

    1. Re:Ruby 1.9.1 and JRuby by Foofoobar · · Score: 4, Interesting

      Well JRuby is an implementation of Ruby in Java which explains the speed but it is still quite slow as it has to 'interpret' everything into java. If you are a fan of Java and like Ruby, I'd suggest Groovy. It's blazingly fast and even puts these to shame. Plus works well Rails, Struts and most MVC frameworks.

      --
      This is my sig. There are many like it but this one is mine.
    2. Re:Ruby 1.9.1 and JRuby by mgkimsal2 · · Score: 1, Interesting

      See my signature - I'm involved in the Groovy world (via GroovyMag) already. :) I do try to keep tabs on what's going on in other JVM languages, especially JRuby.

  2. No Parrot? by Ed+Avis · · Score: 3, Interesting

    Is there a reason why they did not test Cardinal, the Ruby implementation for Parrot? I know it is not production-ready yet but it would be interesting to see how performance compares.

    --
    -- Ed Avis ed@membled.com
  3. JRuby is the clear winner by 0xABADC0DA · · Score: 4, Interesting

    Look at how many 0.002 and similar instantaneous results there are. Tests were run 5 times and the best result used, so there probably wasn't even a single garbage collect that happened in many of the tests. You can't really say from such short benchmarks, but those tests probably did not include Java's strength of hotspot optimization over time.

    There were a couple tests that were much slower in JRuby, but this is countered by the test that failed on Ruby 1.9.1; fast means nothing when you don't finish.

  4. Platform-based Ruby by tcopeland · · Score: 4, Interesting

    I heard Rich Kilmer talk about the various Ruby implementations once; his take on them were that each would be used to leverage the underlying platform. In other words, if you want to use Java libraries, you'll use JRuby. If you want to use the Mac libraries (e.g., via Hot Cocoa), you'll use MacRuby. And if you want to use C extensions like RMagick and libxml2, you'll use MRI.

    I thought that was an interesting way of looking at the various implementations... each one would be appropriate for a different scenario.