tags:

views:

1254

answers:

3

I've read that the latest version of the Ruby interpreter (YARV) will have substantial performance improvements due to bytecode compilation. My question is has anyone tried running this against JRuby? Any noticable differences in execution on Windows?

This link had some good metrics but most were run on Linux...http://antoniocangiano.com/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal/

Thanks in advance!

Todd

+6  A: 

That fib entry is almost 2 years old. JRuby is way faster than that now. Fib is hardly a good benchmark for runtime performance but here are some numbers on my machine (32 bit MBP running SoyLatte (Java 6)):

jruby --server bench/bench_fib_recursive.rb
  0.661000   0.000000   0.661000 (  0.661139)
  0.346000   0.000000   0.346000 (  0.345864)
  0.343000   0.000000   0.343000 (  0.342955)
  0.348000   0.000000   0.348000 (  0.348176)
  0.343000   0.000000   0.343000 (  0.342783)

jr --fast --server bench/bench_fib_recursive.rb
  0.833000   0.000000   0.833000 (  0.832847)
  0.265000   0.000000   0.265000 (  0.264644)
  0.249000   0.000000   0.249000 (  0.248780)
  0.254000   0.000000   0.254000 (  0.253551)
  0.254000   0.000000   0.254000 (  0.254364)

ruby1.9 bench/bench_fib_recursive.rb
  0.380000   0.010000   0.390000 (  0.381058)
  0.370000   0.000000   0.370000 (  0.400535)
  0.370000   0.000000   0.370000 (  0.388423)
  0.370000   0.000000   0.370000 (  0.400368)
  0.370000   0.010000   0.380000 (  0.398530)

So our default mode is a bit faster than Yarv and our newer still somewhat experimental --fast mode is quite a bit faster. We never stand still working on JRuby performance, and we will just keep getting faster.

For the commenter who posted an ancient graph, please check the dates of these things. If it was only a week or perhaps a month or two old...then maybe...but most projects change substantially in a years time much less two.

A: 

The Great Ruby Shootout is more or less the aothoritative source for this kind of context-less comparison.

krusty.ar
A: 

ruby 1.9.1p0 / jruby 1.2.0 Ubuntu Linux

igouy