 <p>I found <a href="http://www.ccsl.carleton.ca/~jamuir/rdtscpm1.pdf" rel="nofollow noreferrer">this info</a> while digging around, and it seems it can be the most cost effective way. I will try it out when I get the guts to dig into assembly. :)</p> <p><strong>UPDATE</strong></p> <p>I tested this with my profiler. although a bit faster, it seems I still have tonnes of other overhead :( (I did not bother with timing as I it did not seem to be enough benefit)</p>