Boost logo

Boost :

Subject: Re: [boost] proposal - Statistically robust function timing for performance decisions.
From: Edward Grace (ej.grace_at_[hidden])
Date: 2009-07-18 13:34:05


> Add me to the bandwagon ;)
>
> How do you handle the fact that sometimes, compiler may otpimize out
> benchamrk code because it has no side-effects ?
>

Ok Joel, now I've run in to precisely the problem you flagged up.
Since I uploaded that stuff to the file vault I thought 'better check
it with the latest g++' on a different machine. Sure enough when I go
to -O1and I see no difference between the function calls... I guess
it's just throwing them away!

On one hand at least I'm getting consistent results - the relative
percentage times reported state that there's no way to tell the
difference!

On the other, it means I'll have to think a little harder about
avoiding this.

Any ideas?

-ed


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