An MD5 hash is actually only 16 bytes, not 128. Given that each
character in a string is two bytes (unicode), if your strings are
typically longer than 8 characters, you ought to get a memory usage
saving from using the MD5 hash.

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of Erick Thompson
> Sent: Monday, April 29, 2002 12:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] Confirm string GetHashCode reflects
> string, not object
>
>
> There is no reason not to store the strings, except that I
> was a little concerned about memory useage. The number of
> strings is going to fairly large, so I was hoping for some
> savings using a hash. Given that the 128 bytes is actually a
> good sized string, and the possibility for false positives, I
> think I may go back to storing the actual strings.
>
> Thanks for the good overview of GetHashCode. I think I need
> to up the time I spend with Richter's book.
>
> Erick
>
> You can read messages from the DOTNET archive, unsubscribe
> from DOTNET, or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to