[Haskell-cafe] Re: does the compiler optimize repeated calls?

Stephane Bortzmeyer bortzmeyer at nic.fr
Wed Sep 6 10:08:17 EDT 2006


On Wed, Sep 06, 2006 at 09:44:05AM -0400,
 David Roundy <droundy at darcs.net> wrote 
 a message of 33 lines which said:

> Have you even considered the space costs of this? For almost any
> non-trivial bit of code I've written, automatic memoization would
> result in a completely useless binary, as it almost guarantees
> horrific space leaks.

And a compile-time option, where the programmer explain which
functions should be memoized?

ghc -fmemoize=foo,bar darcs.hs



More information about the Haskell-Cafe mailing list