有谁知道为什么这个PLINQ代码比常规LINQ慢?无论如何要解决它?
// dic is a Dictionary<int, int>
var location = (from locations in dic.AsParallel
orderby locations.Value descending
select locations.Key).First();
return location;
添加ParallelQuery减慢了很多东西,为什么会出现这种情况呢?