Search code examples
ruby-on-railsrubyperformancejruby

Which is faster: MRI Ruby or JRuby?


If I am using Ruby on Rails, should I install MRI/YARV Ruby or JRuby? Which is faster?


Solution

  • The answer depends on many variables.

    But in general, Ruby 1.9 is faster than JRuby, but Ruby 1.8 is slower than JRuby.

    e.g. according to the Computer Language Benchmarks Game:

    Also, if your application is multi-threaded, JRuby may have some advantages over standard Ruby
    (a.k.a. MRI)], depending on how many cores you have.