[Haskell-cafe] speeding up fibonacci with memoizing

ajb at spamcop.net ajb at spamcop.net
Mon Feb 19 00:38:20 EST 2007


G'day all.

Quoting Stefan O'Rear <stefanor at cox.net>:

> Prior art trumps all.  (by a few %)  granted it doesn't do much memoizing
> anymore :)

Ah, butbutbut... of course the Gosper/Salamin one is going to be
faster if you only compute one Fibonacci number per instance.  The
memoed version is optimised for programs that want more than one.

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list