On Sun, Nov 6, 2011 at 10:31, Bin Jin <[email protected]> wrote:

> Then how about p2num, how to memorize this function.
>
> Also I think it's okay to memorize this kind of function. The type system
> ensure all calling of montgKeys have the same type, e.g., it's a pure
> function without parameter, it's safe to memorize it since it didn't occupy
> more memory than representing dynamic generated types.
>
Did you read the wiki page you were pointed to?  ghc never memoizes
functions by itself; the page provides pointers to a number of ways that
you can add memoization, along with pointers to discussion of why there is
no automated memoization.

http://haskell.org/haskellwiki/Memoization

-- 
brandon s allbery                                      [email protected]
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to