[zeromq-dev] zmq::poll timeout returns immediately on MacOS/X 10.5

Marcin Gozdalik gozdal at gmail.com
Fri Jun 11 12:16:05 CEST 2010


2010/6/11 Steven McCoy <steven.mccoy at miru.hk>

> On 11 June 2010 16:11, Steven McCoy <steven.mccoy at miru.hk> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100611/71841911/attachment.html>


More information about the zeromq-dev mailing list