I am seeing a small performance difference between the following two functionally similar code, I hope someone will be able to help me understand why is there a difference.
//Case 1 Faster
Parallel.ForEach(data, x => func(x))
//Case 2 Slower
Parallel.ForEach(Partitioner.Create(data), x => func(x))
data is of type List<double>
As far as I understand, the default partitioning in the first case would also be similar to Partitioner.Create(data), so there should be no difference in performance.
Is there a way to figure out how the partitioning is done at runtime?