rubyx/test/bench/ruby/adds.rb
Torsten 00bf38a0e6 updating benchmarks
on the new machine, consistent
not rubyx yet
2019-07-23 20:14:28 +03:00

20 lines
207 B
Ruby

def fibo( n)
a = 0
b = 1
i = 1
while( i < n ) do
result = a + b
a = b
b = result
i+= 1
end
return result
end
counter = 100000
while(counter > 0) do
fibo(20)
counter -= 1
end