I need a fast replacement for the System.Collections.Generic.Dictionary. My application should be really fast. So, the repl
Dictionaries allow a specified IEqualityComparer comparer. for strings, or other types of A generic compare may not be the best performing. A little ILSpy will show you that it, if take the default == comparer, if your implementation suffers performance you can inject your own IEqualityComparer compairer. In the end the dictionary will compare hash code of what you provide as a key with the existing hash codes in it’s list of entries.
So if you have specific needs dictionary, perhaps specialize it in FastDictionary class getting to the hascode in a more efficient way,
In your implementation that would be:
var dictionary = new Dictionary(StringComparer.Ordinal);