[Mono-dev] String.GetHashCode()

Kamil Skalski kamil.skalski at gmail.com
Fri Nov 30 22:10:07 EST 2007


Extra memory cost, which would hit all allocated strings, also those
short ones. For some applications, which use millions of small strings
this would be unacceptable hit.

2007/11/30, Alan McGovern <alan.mcgovern at gmail.com>:
> A thought struck me while i was dozing on the plane on the way home from the
> summit.
>
> Since strings are immutable, shouldn't it be possible to compute the
> hashcode once and store it rather than recomputing it over and over again?
> Is there some really obvious reason that i can't think of that would make
> this a bad idea?
>
> Alan.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the Mono-devel-list mailing list