Does anyone know if the HiPerfTimer or the StopWatch class is better for benchmarking, and why?
The overhead of using Stopwatch is negligible. It just calls the Windows API function: QueryPerformanceCounter(). The overhead of using Stopwatch is negligible.
Stopwatch class does accurately measure time elapsed, but the way that the ElapsedTicks method works has led some people to the conclusion that it is not accurate, when they really just have a logic error in their code.
Stopwatch is based on High resolution timer (where available), you can check that with IsHighResolution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With