I need a fast replacement for the System.Collections.Generic.Dictionary<TKey, TValue>
. My application should be really fast. So, the replacement should support:
- Generics
- Add
- Get
- Contains
... and that's it. I don't need any support in LINQ or anything. And it should be fast.
A simple code like:
Stopwatch stopWatch = Stopwatch.StartNew();
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary.Add("fieldName", "fieldValue");
dictionary.Add("Title", "fieldVaaaaaaaaaaaaaaaaalue");
Console.WriteLine(stopWatch.Elapsed);
... prints 00:00:00.0001274, which is alot of time for me, because my application is doing many other things, some of them from old slow libraries that I must to use and are not dependent on me.
Any ideas on how to implement a faster one?
Thank you.