Dictionary <> Performance

I use the dictionary, I will have about a million entries, and I will regularly add, delete, edit and query. They are wondering which side up / down all records will be, and if there is a more efficient way.

+3
source share
3 answers

It depends on what you want to do. If you want a repository of key-value pairs with quick insert, search and delete, you cannot get much better.

But if you want to get the smallest key, the dictionary will not help you, since you have to look for the entire dictionary. In this case, SortedDictionary might be better.

, . , .

+8

, . : Dictionaty ? ? B-?
, O (1) .

0

, , , .

, , , , . < > . , , .

0
source

Source: https://habr.com/ru/post/1733632/


All Articles