rubyx/test/bench/ruby/calls.rb

17 lines
186 B
Ruby
Raw Normal View History

2015-11-24 14:33:16 +01:00
def fibo_r( n )
if( n < 2 )
return n
else
return fibo_r(n - 1) + fibo_r(n - 2)
end
end
counter = 100
2015-11-24 14:33:16 +01:00
while(counter > 0) do
fibo_r(10)
2015-11-24 14:33:16 +01:00
counter -= 1
end