Subject: Re: [boost] [offtopic] C++11 useful trick
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-03 14:19:49
On 07/03/12 12:46, Mathias Gaunard wrote:
> On 07/03/2012 06:22 PM, Roland Bock wrote:
>> Can somebody try with a different compiler? Or is this test complete
>> nonsense for some reason?
> With GCC 4.7.0, no optimization
> real 4.87
> user 4.36
> sys 0.20
> Exhausts all my ram (8 GB) after 24.27 seconds
> With -O3
> real 1.28
> user 0.95
> sys 0.18
> Exhausts all my ram (8 GB) after 25.07 seconds
I'm surprised that with more optimization (-O3) less compile time
is taken (1.28 < 4.87). The gcc 4.7 docs here:
Optimizing compilation takes somewhat more time, and a lot more memory
for a large function.
Anyone know why, in this particular case, -O3 is faster than
with no optimization?