1 min readSep 29, 2020
Interesting post. If I follow along with your code, I get about 1.22 seconds for the 2,000,000 case. However, running the built-in Fibonacci function in the Wolfram Language can do it in 0.02 seconds on the same machine (Fibonacci[2000000]). I suspect this is because of pre-computation (cached values), but even the 10^9 case only takes 7.27 seconds in the WL.