storing the hash multiplier instead of the hash value
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Mar 22 14:04:14 PDT 2010
On 03/22/2010 03:54 PM, Walter Bright wrote:
> 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.
In at least one application, the new hash performed on a par with or
better than g++'s hash_map.
Andrei
More information about the Digitalmars-d
mailing list