Simple performance test of HashSet<T> vs List<T> and Dictionary<TKey, TValue>
C#
Latest commit 4de82be Mar 12, 2011 @theburningmonk updated results
Permalink
Failed to load latest commit information.
HashsetVsListVsDictionaryTest initial commit Mar 12, 2011
README.txt initial commit Mar 12, 2011
TestResults.xlsx updated results Mar 12, 2011

README.txt

A set of simple tests to compare the relative performance of HashSet<T>, List<T> and Dictionary<TKey, TValue>.

The tests cover the simple Add, Remove, and contains test for both value and reference types.

TESTS:
Test 1 - Add 1000000 value type objects with no duplicacy check

Test 2 - Add 1000000 reference type objects with no duplicacy check

Test 3 - Run Contains() method against half the objects in a list of 10000 value type objects

Test 4 - Run Contains() method against half the objects in a list of 10000 reference type objects

Test 5 - Remove half the items in a list of 10000 value types

Test 6 - Remove half the items in a list of 10000 reference types