[Mono-dev] [U-SPAM] Re: String.GetHashCode()

Miguel de Icaza miguel at novell.com
Mon Dec 3 09:45:22 EST 2007


Hello,

    First of all, I love the idea.

> Don't forget that 4 bytes per Hashcode isn't enough. You also need a
> boolean to store if the hash is already computed (as e.g. 0 is a valid
> hash, too).

    You could assume that any string over N would contain the
precomputed hashcode immediately after the string in a sizeof(IntPtr)
aligned 32-bit location.

    What the N should still be measured.

Miguel
> 



More information about the Mono-devel-list mailing list