Re: QueryPerformanceFrequency



Ondrej Spanel <OndrejSpanel.news@xxxxxxxxxxxxx> wrote:

While rdtsc is one possible implementation, on some CPUs/systems the QPC
needs to be implemented in a more complex manner (multiple CPUs, CPUs
with adaptive frequency, like seen first in notebooks and now in most
systems...)

Actually, on most systems with the multiprocessor HAL,
QueryPerformanceCounter simply calls rdtsc directly. And yes, it's
possible for QPC to go backwards slightly.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.



Relevant Pages

  • Re: micro-optimization
    ... Dave Hart wrote: ... the most significant change is to read the processor cycle ... As a consequence of the above I'd say using RDTSC directly instead of QPC ...
    (comp.protocols.time.ntp)
  • Re: micro-optimization
    ... Dave Hart wrote: ... As a consequence of the above I'd say using RDTSC directly instead of QPC is ... This version only uses RDTSC if QueryPerformanceCounter ...
    (comp.protocols.time.ntp)
  • Re: GetTickCount() performance
    ... >> On uniprocessor machines, that is. ... Cycles apart, I made some testing in the past where the ratios were ... approximately 1:10 for rdtsc vs QPC on SMP and 1:80 for rdtsc vs. QPC on ...
    (microsoft.public.win32.programmer.kernel)
  • Re: GetTickCount() performance
    ... >> QueryPerformanceCounter takes 1,000. ... KeQueryPerformanceCounter calls ... I claimed that QPC() was "small hundreds" when using RDTSC. ...
    (microsoft.public.win32.programmer.kernel)