[ENH] WeakIdentityDictionary hashing ( [cd][er][sm][et][approved] Good for the future )

Ned Konz ned at bike-nomad.com
Fri Jul 4 14:47:32 UTC 2003


On Friday 04 July 2003 07:32 am, David T. Lewis wrote:
> I don't know if Andreas' change set directly effects this, but I
> can say that anything the improves performance #scanForNil: for a
> large collection is probably a really good thing.

His change is only appropriate for the WeakIdentityKeyDictionary, not 
the WeakKeyDictionary. Because the *Identity*Dictionaries use the 
object hash, and the hash is only 12 bits, we need to spread out the 
coverage when the collection is more than 4096 long.

You will find identical code in the IdentitySet and the 
IdentityDictionary.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list