OT: recommended way of timing two pieces of code in C

Tom Horsley horsley1953 at gmail.com
Fri Feb 26 15:16:18 UTC 2016


On Fri, 26 Feb 2016 08:31:07 -0600
Ranjan Maitra wrote:

> I have been using get_rusage but I was wondering whether there is a better way?

You most accurate wall time is going to come from looking at
the TSC register (if you are on an x86 processor)

https://en.wikipedia.org/wiki/Time_Stamp_Counter


More information about the users mailing list