📌  相关文章
📜  c#在列表中查找项目的最快方法 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:14.710000             🧑  作者: Mango

代码示例1
If your goal is just to make it very fast to find the
strings in a collection, put them into a HashSet.

HashSet.Contains is an O(1) method, and strings have a
good hash algorithm by default, so it will be difficult
to make a faster routine than this.