Is PLinq Inherently Faster than System.Threading.Tasks.Parallel.ForEach
Summary : I changed from System.Threading.Tasks.Parallel.ForEach and Concurrent Data structure to a simple plinq (Parallel Linq) query. The speed up was amazing . So is plinq inherently faster than Parallel.ForEach? Or is it specific to the task. // Original Code // concurrent dictionary to store results var resultDict = new ConcurrentDictionary<string, MyResultType>(); Parallel.ForEach(items, item => { resultDict.TryAdd(item.Name, PerformWork(source)); }); // new code var results = items .AsParallel() .Select(item => new { item.Name, queryResult = PerformWork(item) }) .ToDictionary(kv => kv