Boost logo

Boost :

From: Gennadiy E. Rozental (rogeeff_at_[hidden])
Date: 2001-11-01 03:20:16

> 2) On many systems, either the timer precision is so low or the
> latency is so high that it is impossible to use to measure the time
> in a single function invocation, unless the function is a major
> burner. The only reliable way is to invoke the function a very
> number of times, and then divide the elapsed time by the number of
> invocations. This problem isn't unique to boost::timer, and is
> getting much worse a clock speeds increase. How many modern
platforms can
> actually deliver timings with high enough precision and low enough
> to accurately measure a single invocation of a smallish function?
> I'm inclined to think the solution may not be to try to fix timer,
> to specify a new timing library with much more precise semantics.
> --Beman

I think it would be a real chalange to write a portable
implementation for the function that for the given user function,
timer facility and user hint for how long the function should work
will calculate the real time the function work. It could need to
calculate somehow how many times it should run the the user function
for appropriate precision to be reached. Alsp effects of using timer
should be messured. It's like in theoretical phisics: mesuring tools
affect messured subject. I once read an articale with some solution -
do not remember where (I think in C++ Report).


Boost list run by bdawes at, gregod at, cpdaniel at, john at