>>So mruby is it realy the faster ruby vm ?
>
> In general, no. This case is special, since mruby does not have
> Bignums and uses faster (and inaccurate) Floats instead.

Thank you for your response.

So I replace
 p+=j*(j-1)*(j-2)*(j-3)*(j-4)*(j-5)*(j-6)*(j-7)*(j-8)*(j-9)
by
 p+=(1.0*j*(j-1))/(1.0*j*j+1)

and
  p+=a(p,j)
by
  p=a(1,j)

Then I get :

>mruby j.rb && ruby j.rb && jruby j.rb
start
end : p=1000.89997999798  1.52808799999999 secs
start
end : p=1000.8999799979861  5.132293 secs
start
end : p=1000.89997999799  3.494 secs

Perhaps windows version give some strange degradation...

-- 
Posted via http://www.ruby-forum.com/.