HashSet vs List vs Dictionary performance test, taken from here.
Add 1000000 objects (without checking duplicates)
Contains check for half the objects of a collection of 10000
Remove half the objects of a collection of 10000
More Related Contents:
- Which method performs better: .Any() vs .Count() > 0?
- Why are multi-dimensional arrays in .NET slower than normal arrays?
- Performance of Arrays vs. Lists
- Is it better to call ToList() or ToArray() in LINQ queries?
- What’s so wrong about using GC.Collect()?
- Why is LINQ JOIN so much faster than linking with WHERE?
- String.Join vs. StringBuilder: which is faster?
- Using the field of an object as a generic Dictionary key
- IDictionary in .NET 4 not covariant
- Why isn’t there an XML-serializable dictionary in .NET?
- How to measure code performance in .NET?
- Does HashSet preserve insertion order?
- .NET – Dictionary locking vs. ConcurrentDictionary
- What is the difference between HashSet and List?
- Why seal a class?
- .NET LINQ query syntax vs method chain
- Why is the first WCF client call slow?
- Do sealed classes really offer performance Benefits?
- Anatomy of a “Memory Leak”
- Can you get a Func (or similar) from a MethodInfo object?
- Entity Framework is Too Slow. What are my options? [closed]
- Horrible redraw performance of the DataGridView on one of my two screens
- System.IO.FileSystemWatcher to monitor a network-server folder – Performance considerations
- How to iterate through Dictionary and change values?
- How do I store a dictionary object in my web.config file?
- Does .NET assembly size affect performance?
- Entity Framework Find vs. Where
- Performance: XDocument versus XmlDocument
- WPF slow to start on x64 in .NET Framework 4.0
- How to implement ConcurrentHashSet in .Net