https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114531

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #23 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #18)
> > different issue from the one that is raised in the PR.  (Unless we think 
> > that
> > -O2 and -O3 should always have the same inlining heuristics henceforward, 
> > but
> > that seems unlikely.)
> 
> Yes, I think point of -O3 is to let compiler to be more aggressive than
> what seems desirable for your average distro build defaults (which needs
> to balance speed and size).

And balance speed and speed!  -O2 is always best *average* speed, -O3 is always
best *top* speed.  You should always use -O2 by default, and -O3 only for files
where you *know* it is a win.

-O3 is -O2 plus aggressive optimisations that sometimes are a win, sometimes
are
a loss.  If -O3 is a win *on average* it means -O2 is not tuned aggressive
enough.

Reply via email to