Boost logo

Boost :

Subject: Re: [boost] [offtopic] C++11 useful trick
From: Roland Bock (rbock_at_[hidden])
Date: 2012-07-03 12:22:11

On 2012-07-03 16:52, Mathias Gaunard wrote:
> Given your test, I suggest you benchmark the preprocessed output
> rather than the source directly.

OK, created preprocessed versions with clang -E and measured again, but
the results are similarly close (and way too much under the influence of
the sheer amount of bytes that need to be processed).

I came up with a new test, see attachments:

Without optimization:
real 0m11.457s
user 0m11.080s
sys 0m0.330s

real 0m11.228s
user 0m10.790s
sys 0m0.400s

With -O3:
real 0m2.910s
user 0m2.730s
sys 0m0.150s

real 0m2.867s
user 0m2.680s
sys 0m0.160s

Interestingly enough, Eric's version takes a bit longer to compile on my

clang version 3.2 (trunk 155315)
Target: x86_64-unknown-linux-gnu

And clang crashes when I add another row of parameters in Eric's
version. No problems with my version...

Can somebody try with a different compiler? Or is this test complete
nonsense for some reason?



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