I was completing some of the Project Euler problems in Racket and usually see the Fibonacci sequence take a couple seconds to generate. While showing my wife I tried a number greater than 4,000,000 and it was instant, so I tried again and again and again, up to a 1,000,000 digit number that took 70 seconds. 10^10000 is still around 100ms.Can anyone explain how this code is so quick? Running it on a Mac M1 Pro (2021).
https://github.com/Mithaecus/cp-project-euler/blob/main/answers/0002.rkt
https://github.com/Mithaecus/cp-project-euler/blob/main/answers/_solution.rkt