storing the hash multiplier instead of the hash value

Walter Bright newshound1 at digitalmars.com
Mon Mar 22 13:54:14 PDT 2010


Andrei Alexandrescu wrote:
> Then you might be glad to hear that Walter has recently improved the 
> default hashtable implementation significantly (at least for heavy-duty 
> applications).

All I did was switch from a tree used to resolve a bucket collision with a 
singly linked list. The improvement comes from reduced memory consumption, which 
for uint[uint] changes a node from 20 bytes to 16, thus halving the memory used.

If the hash node still uses over 16 bytes, I doubt there will be any improvement 
at all.

Note that the linked list implementation is equivalent to g++'s hash_map 
implementation.



More information about the Digitalmars-d mailing list