just doing a double click on the Fibonacci Solution :hypothetically speaking, can a compiler take the recursive solution and optimize it to the Binet's formula in machine code? . and obviously apply that technique to other similar problems?.
The author’s proposed solution only works up to n = 78. If you want to speed up the calculation for small values, just cache them all.
Personally I don’t ever want a compiler trying to replace straight-forward integer algorithms with floating point formulas. YMMV.