From: Paul Brannan Date: 2008-06-03T00:29:37+09:00 Subject: Re: Huge performance gap On Tue, May 13, 2008 at 12:26:48PM +0900, Charles Oliver Nutter wrote: > And Ruby 1.9: > > ~/NetBeansProjects/jruby ??? ../ruby1.9/ruby -I ../ruby1.9/lib > test/bench/bench_fib_recursive.rb > 0.400000 0.010000 0.410000 ( 0.412421) > 0.400000 0.000000 0.400000 ( 0.407236) > 0.400000 0.000000 0.400000 ( 0.415222) > 0.400000 0.010000 0.410000 ( 0.417042) > 0.400000 0.000000 0.400000 ( 0.452934) > > So yes, there's definitely room to improve all the implementations... Similar speedups with ludicrous, which isn't even very smart about its optimizations: cout@bean:~/download/jruby/jruby/test/bench$ ruby1.9 bench_fib_recursive.rb 1.450000 0.030000 1.480000 ( 1.628318) 0.930000 0.020000 0.950000 ( 1.956004) 0.920000 0.020000 0.940000 ( 0.937877) 0.930000 0.020000 0.950000 ( 0.958286) 0.930000 0.020000 0.950000 ( 0.946474) cout@bean:~/download/jruby/jruby/test/bench$ ludicrous bench_fib_recursive.rb 0.670000 0.010000 0.680000 ( 0.679764) 0.670000 0.020000 0.690000 ( 0.688893) 0.680000 0.010000 0.690000 ( 0.695944) 0.680000 0.010000 0.690000 ( 0.694999) 0.680000 0.020000 0.700000 ( 0.696761) Paul