Boost logo

Boost :

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

On Wed, Feb 17, 2016 at 5:34 PM, Thorsten Ottosen <tottosen_at_[hidden]> wrote:
> Some more questions:
> A. is the lambda optimized away?

It is. I got the same results without any helper functions.

> B. Do the test run the same number of times? Is it asserted at runtime?

It does, just checked it manually.

> C. Do you compile via bjam? I mean, is all the right flags present, e.g.

I use bjam. I have -DNDEBUG on the compiler invocation line. I also
have -O3. I wonder why the release build have -O3 instead of -O2 by

> D. How does the actual code between std::vector and devector compare? Maybe
> there could be hints to the difference.

I found nothing indicative.

> I don't understand why its necessary with all this complicated stuff. AFAICT, a single threaded program runs on one CPU.

A single threaded program can be preempted, and migrated to an other
CPU later. Since I'm using TSC and processor isolation, it's important
to always run the program on the same CPU core.

> If you do a benchmark without reserve, you should configure devector to use the same growth factor/initial size as the std/boost equivalent.

Currently, vector tests use reserve, the growth policy is not used.

>This is platform dependent, so one test per library is needed.

Regarding queues, I matched the segment size to my platform (512
elems), after the issue above is resolved, we can have tests for
different libs, yes.

Thanks for checking,

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