Fun project - faster associative array algorithm

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 7 12:04:54 PDT 2015


On Tuesday, 7 April 2015 at 18:28:22 UTC, bearophile wrote:
> w0rp:
>
>> It doesn't amaze me at the moment, as it's slightly faster for 
>> integers, and slightly slower for strings at the moment.
>
> One problem with D strings is that they don't cache their hash 
> value.
>
> Bye,
> bearophile

I probably need to put that back in for some types. I tried 
taking the hash values away. I know that for integers where the 
size is <= size_t.sizeof, then I can keep the hash codes out of 
the array, as the key is always the same as the hash.


More information about the Digitalmars-d mailing list