R: [Mono-devel-list] [IDEA] Caching String Hashcodes
federico.giampietro at poste.it
Sat May 1 11:22:22 EDT 2004
this is my first post.
I think it is a great idea !
Da: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com] Per conto di Andreas Nahr
Inviato: sabato 1 maggio 2004 15.41
Oggetto: [Mono-devel-list] [IDEA] Caching String Hashcodes
I thought about a pretty simple thing. As strings are immutable we are able
to cache their hashcodes. For (long) strings that make several calls to
GetHashCode this would give us an incredible perf boost. However it will
cost us 4 bytes of additional data per string even if the hashcode isn't
used at all.
Should I go for it or leave it as it is?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list