Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-07-16 23:26:37


On Mon, 17 Jul 2006 13:08:28 +1000, Martin Slater
<mslater_at_[hidden]> wrote:

>
>> frequency adjustments, such as performed via SpeedStep, are not. But
>> it's just a first cut. And then, I don't think one would want to use
>> these facilities with SpeedStep in the way.
>
>
>I think it should at least detect SpeedStep and fail or fall back to a
>possibly lower precision but stable timer. IMO without this its unusable
>except for very basic performance tests.

Actually there are some usages where one wants the cycle count, rather
than the elapsed time, so I was thinking to provide a cpu_cycle_timer
(that's not a "timer" in the strict sense but seems to fit in the
framework) anyway. Of course the elapsed time is just the cycle count
divided by the frequency, if the frequency is fixed. I'll see in the
Intel docs if it is possible to detect SpeedStep activation (you won't
believe what the processor is actually able to tell you :)) or if
other solutions exist.

--
[ Gennaro Prota, C++ developer for hire ]
[    resume:  available on request      ]

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