storing the hash multiplier instead of the hash value

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Mar 22 14:03:13 PDT 2010


On 03/22/2010 03:36 PM, Walter Bright wrote:
> Andrei Alexandrescu wrote:
>> Better suggestions are always welcome. For integrals I'm unclear on
>> what we could use to make things better. (Clearly we could and should
>> get rid of the extraneous field.)
>
> Unfortunately, it won't be much of a win. Memory allocation is done in
> buckets of size 16, 32, 64, etc. Reducing the node size for a uint[uint]
> from 16 to 12 saves no memory at all.

As we discussed, if nodes are allocated in bunches, you could store 5 
nodes in a 64-byte block instead of 4. That's more than a 25% increase 
in effectiveness because the per-block bookkeeping is also slashed by 5.

Andrei



More information about the Digitalmars-d mailing list