Why is Dictionary.First() so slow?

前端 未结 5 1108
自闭症患者
自闭症患者 2020-12-11 16:35

Not a real question because I already found out the answer, but still interesting thing.

I always thought that hash table is the fastest associative container if you

5条回答
  •  一个人的身影
    2020-12-11 17:33

    Well, Hash Tables aren't sorted, my guess is it it has to do some sort of sort before it can do an iteration, or some sort of scan, if its already sorted, it can just loop through.

提交回复
热议问题