www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Memoizing methods

reply "kyle" <rabblerabblerabble rabble.rabble> writes:
If you memoize a method inside a class definition using 
std.functional.memoize is caching done in a per-object manner, or 
do all objects of this class share cached return values? Thank 
you.
Dec 18 2014
parent "Dicebot" <public dicebot.lv> writes:
On Friday, 19 December 2014 at 02:45:13 UTC, kyle wrote:
 If you memoize a method inside a class definition using 
 std.functional.memoize is caching done in a per-object manner, 
 or do all objects of this class share cached return values? 
 Thank you.
Memoize uses one hash table per symbol it is applied to -> all objects
Dec 19 2014