Skip to content

theburningmonk/HashSet-vs-List-vs-Dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Simple performance test of HashSet<T> vs List<T> and Dictionary<TKey, TValue>

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages