3 ms·
What gives you the idea that Haskell implicitly memoizes functions? And it obviously isn't memoizing. If the function were memoized, the timing would be much,
by SamReidHughes 19y ago
What gives you the idea that Haskell implicitly memoizes functions?
And it obviously isn't memoizing. If the function were memoized, the timing would be much, much less than 0.48 seconds.
- dreish 19y agoI have to admit I understand Haskell a lot less than I thought I did (which wasn't much to begin with -- I've done maybe four or five Euler Project puzzles with it and nothing else). I tried this same Fibonacci function on my machine using GHC 6.8.1, and it's clearly O(1.62^N). I withdraw my earlier dumb statement.