add ruby bench programs and numbers

This commit is contained in:
Torsten Ruger
2015-11-24 15:33:16 +02:00
parent 535757fa98
commit fa63c6db6a
10 changed files with 62 additions and 3 deletions

19
test/bench/ruby/adds.rb Normal file
View File

@ -0,0 +1,19 @@
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(40)
counter -= 1
end