Notice
Recent Posts
Recent Comments
Link
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

Trikang

[C#] HashSet과 Dictionary 퍼포먼스 비교 본문

개발 Tip

[C#] HashSet과 Dictionary 퍼포먼스 비교

Trikang 2020. 7. 10. 16:35

출처에 들어가면 모든 내용을 더 상세히 볼 수 있음.

 

 

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

 

출처

https://theburningmonk.com/2011/03/hashset-vs-list-vs-dictionary/

 

HashSet vs List vs Dictionary | theburningmonk.com

Out of curiosity after reading some articles on how the HashSet (introduced in .Net 3.5) class is more performant than the List class for set operations, I set about doing some experiments of my own to get a feel of just how much faster a HashSet is,

theburningmonk.com

https://stackoverflow.com/questions/2728500/hashsett-versus-dictionaryk-v-w-r-t-searching-time-to-find-if-an-item-exist

 

HashSet versus Dictionary<k, v=""> w.r.t searching time to find if an item exists</k,>

HashSet t = new HashSet(); // add 10 million items Dictionary<k, v=""> t = new Dictionary<k, v="">(); // add 10 million items. Whose .Contains method will return quicker? ...</k,></k,>

stackoverflow.com

 

Comments