[Mono-devel-list] [IDEA] Caching String Hashcodes

Andreas Nahr ClassDevelopment at A-SoftTech.com
Sat May 1 09:40:41 EDT 2004


Hi,

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?

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040501/ce834ef4/attachment.html 


More information about the Mono-devel-list mailing list