Boost logo

Boost :

Subject: Re: [boost] [XInt] CoW/Move Timings
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2011-03-10 14:00:02


Chad Nelson wrote:
> On Wed, 09 Mar 2011 19:36:44 -0800
> "Jeffrey Lee Hellrung, Jr." <jhellrung_at_[hidden]> wrote:
>
>> [...] The 2Kbit section has me wondering about the accuracy of these
>> timings, as "CoW, no Move" outperformed "CoW, Move", which should
>> definitely not be the case. I can't think of any circumstance where
>> move emulation gives you a penalty...
>
> Those specific timings were close enough (within 0.03 seconds of each
> other) that they may well be within the margin of error. It's
> essentially impossible to do completely accurate timings on a
> multitasking OS.

Repeat the experiment a large number of times and take the minimum runtime. That will be your runtime without interruption or with minimal interruption. Also, interleave your different tests. The first iteration of a test will generally be slower than the second because it warms to cache with code and data needed for the test. If you want warm or cold cache numbers depends on how you expect the code to be used. Usually warmed numbers are what people are interested in.

Regards,
Luke


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