Click here to Skip to main content
15,882,278 members

Comments by Cybermaxs (Top 2 by date)

Cybermaxs 10-Nov-14 9:20am View    
Reason for my vote of 2 \n I embrace the usage of Stopwatch to measure code performance.

It's a common mistake to use DateTime for this scenario as describe by Eric Lippert(http://tech.pro/tutorial/1295/c-performance-benchmark-mistakes-part-two)

Stopwatch has been specifically designed to solve this kind of problem.
DateTime.Now was designed to solve a different problem : to tell you what time it is right now.

Stopwatch has always a higher precision than DateTime.Now (from ~10 millisecond precision to sub-microsecond precision).

Benchmarking is hard http://mattwarren.org/2014/09/19/the-art-of-benchmarking/. For example, Jit-Compilation may affect the "speed".
Cybermaxs 3-Jun-14 15:29pm View    
Reason for my vote of 2 \n where do you talk about asp.net here ?