Associative array of strings perf

Daniel Murphy yebblies at nospamgmail.com
Fri Nov 18 19:48:55 PST 2011


Maybe different hash functions are used?

"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:ja76i7$1u3i$1 at digitalmars.com...
> Do you know why an associative array like this:
> uint[immutable(char)[]] aa;
>
> Is almost two times faster than a very similar associative array like 
> this?
> uint[immutable(E)[]] aa;
>
> Where E is a named typed enum of chars like:
> enum E : char { a='a', b='b', c='c', d='d', ... }
>
> Testing code:
> http://codepad.org/hzcRH8Bd
>
> Bye,
> bearophile 




More information about the Digitalmars-d mailing list