4 ms·
No, you need a proper API for benchmarking. chrono only gives you one, for a single timestamp. Benchmarking needs a separate timer_start and timer_end function
by rurban 4y ago
No, you need a proper API for benchmarking. chrono only gives you one, for a single timestamp.
Benchmarking needs a separate timer_start and timer_end function.
One with cpuid,rdtsc and one with rdtscp,cpuid.
- fooblaster 4y agoIts very easy to get two timestamps at the start and end of the routine and subtract the difference with Chrono. No cpu pinning or preemption control is necessary.