Why is a search in SortedDictionary <> a SLOWER than a search in a dictionary <>?

Like a person, I always thought that searching in something sorted is a way faster than searching is not sorted.

But looking at it http://dotnetperls.com/sorteddictionary I can say that I was wrong.

Can someone explain why this is so?

+4
source share
1 answer

An unsorted dictionary is probably a hash map, so searching is almost equal to O (1), assuming not too many collisions, while searching in a sorted list is the best case of O (log N)

+13
source

All Articles