2010/6/11 Steven McCoy <[email protected]> > On 11 June 2010 16:11, Steven McCoy <[email protected]> wrote: > >> "It takes 324 cycles per call to complete 1 million GTOD calls without >> RDTSCP and 221 cycles per call with the capability." >> >> >> > Compare this with HPET which I clock about 500ns when using mmap(), it > would be significantly slower when using libc IO to read from the device. > > WIthout RDTSCP or HPET you can use CPUID+RDTSC or complicated tracking of > current cores and TSC offsets, etc, which is absolutely broken on > hyperthreading processors. >
A micro-benchmark comparing various time-tracking methods (for FreeBSD but probably easily portable) was posted on http://unix.derkeiler.com/Mailing-Lists/FreeBSD/performance/2008-06/msg00000.htmlOn Linux the fastest is clock_getttime(CLOCK_MONOTONIC_COARSE) (recently introduced in 2.6.3X - see http://lwn.net/Articles/347811/) -- Marcin Gozdalik
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
