[Etoys] Rehashing saves 600 KB
Andreas Raab
andreas.raab at gmx.de
Thu Apr 12 13:28:35 EDT 2007
Sure:
(Set allSubInstances collect:[:set|
set capacity - (Set sizeFor: set size) -> set
]) asArray sort reversed
This will tell you how many elements you regain for each set used. Then
use "chase pointers" to identify them. In my system I get 50% of the
overall improvement out of two sets (the symbol table and
MCDefinition::Instances).
Cheers,
- Andreas
Bert Freudenberg wrote:
> You know which? Or how to find them - ratio of capacity to size?
>
> - Bert -
>
>
> On Apr 12, 2007, at 18:44 , Andreas Raab wrote:
>
>> In my experience 90% of the effect come from a dozen or so of sets. It
>> might be safer to rehash those explicitly.
>>
>> Cheers,
>> - Andreas
>>
>> Bert Freudenberg wrote:
>>> Hi folks,
>>> Marcus Denker pointed out that rehashing reduces the image size
>>> quite a bit. I did
>>> Set rehashAllSets
>>> and the saved image indeed is 650 KB smaller.
>>> Can anyone think of a reason not to do this? Maybe there are some
>>> Sets/Dictionaries intentionally made larger than necessary for speed
>>> reasons?
>>> - Bert -
>>> _______________________________________________
>>> Etoys mailing list
>>> Etoys at laptop.org
>>> http://mailman.laptop.org/mailman/listinfo/etoys
>
>
>
>
More information about the Etoys
mailing list