Boost logo

Boost :

Subject: Re: [boost] What's wrong with this benchmark
From: Benedek Thaler (thalerbenedek_at_[hidden])
Date: 2016-02-19 01:48:27

On Thu, Feb 18, 2016 at 8:51 AM, Michael Marcin <mike.marcin_at_[hidden]> wrote:
> I think there is definitely something not quite right.
> One thing I notice is that the line:
> sample.push_back(get_clock() - base_clock);
> Is being timed.
> Which could potentially access a new memory page I think.
> In pin_thread you have _MSVC_VER instead of _MSC_VER

Good catch, fixed this.
> Hacking up std::vector and adding a push_back_reserved that does no bounds
> checks I get consistently very strange timings.
> (Code included at the bottom to make it obvious that the latter should be no
> slower).
> My simpler, and I'm sure in many ways inferior benchmark, shows much more
> believable results.

Still, there are huge differences between essentially same programs.


I gave a spin to rdtscp, no success, but I continue looking at this doc.


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