On Mon, Apr 28, 2014 at 5:46 PM, Andrew Savchenko <[email protected]> wrote: > Hello, > > On Sun, 27 Apr 2014 07:23:11 -0400 Rich Freeman wrote: >> And yet, in the same paragraph you mention -O3, which is >> tantamount to just setting a flag and walking away. That turns >> on 14 things you probably don't really need. > > Why 14 things? ... > > From my experience only three of them are harmful: ... > All other -O3 option have either no effect or measurable > performance enhancements in the range of several percent.
You missed my point. I think running batch optimizations like -O2/3 only makes sense. The argument was that -flto doesn't always help, and thus shouldn't always be used. My point was that convenience options like -O2/3 were used because while the options don't always help, they usually do, and nobody wants to bother with micromanaging them. Personally I use -O2 or -Os with a few additional options that are less space-expensive than full -O3, on the premise that cache and memory conservation probably buys you more than avoiding some jumps. But, short of profiling every package any selection is going to be a suboptimal choice based on averages. I wasn't trying to say that there was something wrong with -O3/2/etc. Rich
