Hi,

I was mostly thinking about automatic memoization, i.e. not explicit
memoization.

Also, it should only add some small constant overhead for each
function and maybe leads to huge improvements after all. But maybe I'm
also wrong and for an "average" function it doesn't lead to
improvements.

But the only real way to know that is to try it out.

I don't really understand why it would be such a huge substantial
undertaking. I would store the memo-ed values just in some hidden
global variable and proxy every function through some simple
memoizing-handler. Or is that complicated to add as an option to GHC?

Regards,
Albert


On Fri, Apr 22, 2011 at 2:08 PM, Stephen Tetley
<[email protected]> wrote:
> Hi Albert
>
> My contention is that there are specific programs (or specific
> functions within them) that memoization improves - hence adding
> memoization to those programs rather than the compiler is the way to
> go.
>
> Not that I've looked deeply, but I think adding memoization to GHC
> would be a pretty substantial undertaking. In the first instance where
> do you put the memo-ed values? - if you're doing it for all functions
> you might have to change the RTS as well as the compiler.
>
> Best wishes
>
> Stephen
>
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to