Immediate idea would be to try to exploit

https://en.wikipedia.org/wiki/Fibonacci_number#Matrix_form

and its representation. This yields the memoization trick from above. If
done correctly, it might be possible to get the O(lg n) run-time which
would be highly desired.

On Tue, May 15, 2018 at 6:51 AM Alex Dvoretskiy <advoretski...@gmail.com>
wrote:

> Just noticed. Even restructuring the code the way kjk did improved runing
> time, without caching. Amazing.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to