Did a quick search, didn’t find the right answer. Can someone comment on this 2005 article again please ?
http://msdn.microsoft.com/en-us/library/ee417693.aspx
With power management technologies becoming more commonplace in today’s computers, a commonly-used method to obtain high-resolution CPU timings, the RDTSC instruction, may no longer work as expected. This article suggests a more accurate, reliable solution using the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency.
xxxxx@hotmail.com wrote:
Did a quick search, didn’t find the right answer. Can someone comment on this 2005 article again please ?
http://msdn.microsoft.com/en-us/library/ee417693.aspx
With power management technologies becoming more commonplace in today’s computers, a commonly-used method to obtain high-resolution CPU timings, the RDTSC instruction, may no longer work as expected. This article suggests a more accurate, reliable solution using the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency.
What would you like to know? The current batch of processors maintains
the rdtsc frequency even in the face of power changes, so to a certain
extent the problem no longer exists, but it has always been better to
use QueryPerformanceCounter for good timing. In many cases,
QueryPerformanceCounter does nothing other than an rdtsc anyway, but at
least it knows when it is safe to do so.
QPC can’t be any more “accurate” than rdtsc, but it can certainly be
more reliable.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
ok, if QueryPerformanceCounter/KeQueryPerformanceCounter is always better than RDTSC, i’ll stick to it. That’s all i want to know, 
Thanks !
xxxxx@hotmail.com wrote:
Did a quick search, didn’t find the right answer. Can someone comment on this 2005 article again please ?
http://msdn.microsoft.com/en-us/library/ee417693.aspx
With power management technologies becoming more commonplace in today’s computers, a commonly-used method to obtain high-resolution CPU timings, the RDTSC instruction, may no longer work as expected. This article suggests a more accurate, reliable solution using the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency.
What sort of comment do you want? There’s an official recommended
architecture-independent way to do it which always works, and there’s a
hack which sometimes works on some architectures. Choose whichever you
think is the better choice.