Boost logo

Boost :

From: christopher diggins (cdiggins_at_[hidden])
Date: 2005-02-12 10:40:04


Christopher Diggins
Object Oriented Template Library (OOTL)
http://www.ootl.org
----- Original Message -----
From: "Michael Walter" <michael.walter_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, February 11, 2005 10:15 PM
Subject: Re: [boost] Re: Re: Re: Re: Profiling Library suggestion

> On Fri, 11 Feb 2005 19:57:56 -0500, Preston A. Elder
> <prez_at_[hidden]> wrote:
>> On Fri, 11 Feb 2005 19:30:36 -0500, christopher diggins wrote:
>> [...]
>> std::clock() and I assume QueryPerformanceCounter() give you an amount of
>> clock ticks. This number is only incremented when the CPU works on your
>> task.
> AFAIK your assumption is wrong.

Can you point me to documentation which supports your assertion?

> The only problem with QueryPerformanceCounter() is that it can "jump"
> on some chipsets.

I believe this problem is perhaps not restricted to
QueryPerformanceCounter() but to any counter counting mechanism, as the
problem is at the chipset level not the API level.

> A good idea is to use a "control timer" with lower
> frequency (or just timeBeginPeriod() + timeGetTime(), if its precision
> is good enough for the task).

I am not sure what you mean by a control timer, but I do have a workaround
for the QueryPerformanceCounter() issue in
http://www.cdiggins.com/profiler/v2/high_resolution_timer.hpp

Thanks for the feedback,
Christopher


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk