Re:Things I Learned Writing a Fibonacci Generator in JavaScript
by Johnny_Brahms on Tuesday May 17, 2016 @03:16AM
(#11711842)
I remember trying out different approaches a long time ago, and I believe that the fastest way was through "fast doubling" [0]. I applied FFT-based multiplication to it for larger numbers, and it got really really fast :)
Edit: using karatsuba like the page below is probably preferrable, though.
Edit: using karatsuba like the page below is probably preferrable, though.
[0]: https://www.nayuki.io/page/fast-fibonacci-algorithms