[mercury-users] Memory consumption w/memoization

Peter Hawkins peter at hawkins.emu.id.au
Fri Sep 23 14:01:20 AEST 2005


Hi...
On Sep 22, 2005, at 8:33 PM, Zoltan Somogyi wrote:

> On 22-Sep-2005, Kral Stefan <skral at mips.complang.tuwien.ac.at> wrote:
>
>> Is there a way to limit the amount of memory used for the
>> memoization of a predicate?
>>
>
> No, not at the moment. We have recognized the issue, and I know  
> that some
> other people have also implemented probabilistic memoization, where  
> you memo
> only e.g. 5% of answers. (On transitive closure of graphs, this  
> gets most of
> the available speedup, if I recall the relevant paper correctly.) I  
> don't know
> of any widely disseminated systems that have such facilities, but  
> then again
> I haven't looked lately.
>
> This has always been on my list of ideas to try sometime later, the

This technique is used by BDD libraries too (since one can easily use  
more BDD nodes over the lifetime of a program than one could fit in  
memory). If you want an application, the BDD implementation in the  
Mercury source might perform better a more forgetful memoization  
algorithm.

=)
Peter
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list