技术总奸

2012年6月23日

HashSet<T> vs List<T>

摘要: 大数据量下,生成HashSet成本要稍高于List。但查询HashSet效率要远高于List。 static void Main(string[] args) { Stopwatch watch = new Stopwatch(); List<string> list = new List<string>(); HashSet<string> hash = new HashSet<string>(); watch.Start(); for (int i = 0; i <... 阅读全文

posted @ 2012-06-23 22:41 阿福 阅读(1170) 评论(0) 推荐(0) 编辑