[ENH] Using collision buckets to reduce the number of probes

Leandro Caniglia caniglia at dm.uba.ar
Sun Oct 7 23:36:18 UTC 2001


The attached change set is inspired in the "Horrible
unscalability..." thread.

One solution to the "4096 hash problem", as stated by Scott
and others, can be achieved by implementing Dictionary
in such a way that colliding keys are kept appart in
collision buckets.

The enclosed change set extracts the implementation of this
strategy in OpenHashDictionary, as we have programmed it
for GemSqueak. 

Following the Scott's example, assume that you have a dictionary
of 100,000 associations. With 4096 different hash values, the
collision buckets would contain, on the average, an approximate
number of 24.5 elements (each of them). This is the best we can
get with the current "limitation" of 12 bits of identity hash. 

/Leandro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenHashDictionary.3.cs.gz
Type: application/octet-stream
Size: 6903 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011007/252d7b0d/OpenHashDictionary.3.cs.obj


More information about the Squeak-dev mailing list