[squeak-dev] Re: The Inbox: Collections-cmm.673.mcz

Chris Muller asqueaker at gmail.com
Fri Jan 1 21:45:04 UTC 2016

> what about using the idea of HashedCollection >> #growSize? It is "self
> class goodPrimeAtLeast: array size * 3 // 2 + 2". Is it specific to hashing
> that a prime number is used there?

Yes..  and now I understand why it grows linearly; because its a
linearly-searched Array.  The elements are not interspersed as in a
HashedCollection, we don't "need" the extra room for that purpose, it
was just to reduce the number of times it needs to grwo by a factor of
10.  My change simply reduces the number of times it must grow even
more, however, since it appears we have nothing to ever shrink it back
down, we should not be growing by double right now, because that would
waste too many slots.  This way, a max of 10 slots is wasted.

Still, we need the as: WeakArray fix..

More information about the Squeak-dev mailing list