A faster replacement to the Dictionary

后端 未结 10 883
醉梦人生
醉梦人生 2020-12-08 15:03

I need a fast replacement for the System.Collections.Generic.Dictionary. My application should be really fast. So, the repl

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 15:22

    If you really need better performance, you're going to have to give up something major - like generics, dynamic memory allocation, etc. All those features sacrifice some performance.

    I would avoid using Contains if at all possible and look at TryGetValue etc.

提交回复
热议问题