On 02.10.2010 19:01, Igor Stasenko wrote:
On 2 October 2010 19:47, Stéphane Ducasse<stephane.duca...@inria.fr> wrote:
Hi igor
do you understand why the previous definition was
cachedDefinitions
Definitions ifNil: [Definitions := WeakIdentityKeyDictionary new.
WeakArray addWeakDependent: Definitions].
^ Definitions
i don't. :)
It just a way to free memory as fast as possible.
But its really not worth spending so much CPU in order to save few
bytes of memory.
Without registering the dict for finalization, the values won't ever be
removed with the current implementation.
Which can be somewhat hampering to performance once you have lots of
nil-keyed elements all stashed from index 1 and onwards after a rehash.
Cheers,
Henry
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project