C# Dictionary Performance

前端 未结 5 1696
死守一世寂寞
死守一世寂寞 2021-01-05 20:01

I am using a Dictionary to store data, and will be caching it. I would like to avoid server memory issues, and have good performance by limiting the size of the Dictionary&

5条回答
  •  一向
    一向 (楼主)
    2021-01-05 20:51

    You don't need to limit the size of the Dictionary to archieve good performance.

    As the documentation says:

    Retrieving a value by using its key is very fast, close to O(1)

提交回复
热议问题