<p><pre><code>   &gt; How I am supposed to know that without asking 
   &gt; someone that already knows?
</code></pre>
A good idea is to ask the answerer how he&#x2F;she figured it out.<p>Usually when I run into compiler bugs, I look at the assembly output to make sure.<p>I don&#x27;t know why you were messing with RDTSC, but usually when I need a high resolution timer I use clock_gettime() or gettimeofday(). The former doesn&#x27;t work on OSX, but the latter does, and mach_absolute_time() or clock_get_system_nanotime() seem to work on OSX if you really need them.