[gambit-list] memoization of delayed computations

Álvaro Castro-Castilla alvaro.castro.castilla at gmail.com
Wed May 5 15:14:17 EDT 2010


El 5 de mayo de 2010 17:21, Christian Jaeger <chrjae at gmail.com> escribió:

> > Thanks again for the explanation. Is your implementation sharable or
> maybe
> > you could give me some pointers?
>
> https://mercure.iro.umontreal.ca/pipermail/gambit-list/2007-May/001435.html
>
> > I'm currently trying out with this other approach (the hashtable),
> different
> > from force/delay.
> > http://community.schemewiki.org/?memoization
>
> The text on this page is not very bright, in fact it seems to be
> confusing you. If you need to map a set of values to a computation,
> then promises don't help you, exactly because they don't provide for
> any mapping. As I said, Scheme implementations are not required to,
> and usually do not, detect when a computation (even if wrapped in a
> delay) has been done previously with the same context values. A new
> promise is created every time.
>
> Ch.
>

Yes, what I understood (wrongly, apparently) from the text is that
force/delay idioms can be used to memoize the value of a function output
given some arguments. If a new promise is created every time it cannot be
used directly as a way to put the work of memoization on the compiler (which
is what I wanted). I don't look for a call-by-need mechanism, but something
to avoid recalculating a procedure every time I pass the same arguments.
Anyway I think I have a better picture now.

Best regards,

Álvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100505/d3b26ea4/attachment.htm>


More information about the Gambit-list mailing list