2 ms·
Some optimization switches are off by default as they can subtly change the semantics of your code. Yes, this can trip up even quite knowledgeable people as wi
by gumby 6y ago
Some optimization switches are off by default as they can subtly change the semantics of your code.
Yes, this can trip up even quite knowledgeable people as with the fp post from Lemire the other day — he thought gcc was making a mistake, but it was doing the correct thing.
But there are plenty of others, for example telling the compiler not to worry about aliasing. I might use this on certain modules or individual files which were carefully written for this.
Or asking for more aggressive loop unrolling Which could increase code size but improve performance (or not!).
99.9% the defaults are fine.