Monthly Archive for June, 2007

Performance of Case Insensitive Hashtables

I wrote a small test, comparing the performance of case sensitive and case insensitive hashtables in .NET. The result is, that the case sensitive hastable is 3 times faster than the case insensitive hashtable …mmmh, quite a difference!

Case sensitive - 527 ms:
new Dictionary<string, string>()

Case insensitive - 1297 ms:
new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)

Source Code