I previously posted a screenshot showing the magnitude of difference between execution times for various ways of computing some total value.
Here's the relevant source code for the fastest single threaded option, ListIntGenericsForEach
for (int i = 0; i < Max; i++)
{
li.ForEach(foo => { total += foo; });
}
0 comments:
Post a Comment