Ah, I'm not the onliest one noticing this problem...pdwyer wrote:Interestingly I get much closer results when I swap the position of the functions around.
This occured already at other performance tests on my machine, too...
In some cases, the first loop was always a bit slowier than the following loops.
However, the inaccuracy with ElapsedMilliseconds() is IMHO not significant, if the difference is big enough:
(141-16)-(62+16) = 47 ms
47 is still indicates that the second loops is faster, even if ElapsedMilliseconds() misses the actual time by 16 ms.