Hi,
Ruby 1.8.6-p111
JRuby 1.1.2
Java 1.6
Windows XP
I ran some Rational benchmarks and JRuby beat MRI on all benchmarks.
Except one - Bignum#rpower:
MAX = 300000
BIG = 2**6
NUM = 27
Benchmark.bm(25) do |x
x.report("Bignum#rpower"){
MAX.times{ BIG.rpower(NUM) }
}
end
Here are my results:
C:\>ruby bench_rational.rb
user system total real
Bignum#rpower 3.594000 0.031000 3.625000 ( 3.704000)
C:\>jruby bench_rational.rb
user system total real
Bignum#rpower 6.750000 0.000000 6.750000 ( 6.749866)
JRuby generally does very well with numeric calculations. I'm curious
why it's slower in this particular instance.
Regards,
Dan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email