I\'m trying to understand when the usage of parallel
will increase the performance.
I tested it with a simple code that ran over 100,000 items in List<
If you are iterating over a collection and doing something that is computationally intensive to each element (especially if the "something" is not also I/O intensive), then you are likely to see some benefit from parallelizing the loop. Setting a property to string.Empty
is not computationally expensive, which is probably why you didn't get an improvement.