Rust to the rescue (of Ruby)
Fabiano B.
539

It is great article with bad algorythm. Recursive calculation is really slow for many lang. On my HW has your Ruby solution 39.951s

I am not expert of Rust, but I think that doesn’t use recursive calculation for fibonacci.

Small Ruby improovments

def fibonacci(n) 
 j, k = [0,1
 n.times {|i| j, k = [k, k + j] } 
 return j
end

And Ruby is again really fast 0.32s.

Show your support

Clapping shows how much you appreciated František Svoboda’s story.