On 4/22/07, Laurent GUERBY <[EMAIL PROTECTED]> wrote:
On Sun, 2007-04-22 at 14:44 +0200, Richard Guenther wrote:
> On 4/22/07, Laurent GUERBY <[EMAIL PROTECTED]> wrote:
> > > > but also does not make anyone actually use the options.  Nobody reads
> > > > the documention.  Of course, this is a bit overstatement, but with a
> > > > few exceptions, people in general do not enable non-default flags.
> > >
> > > I don't think this is fair.
> > > Most people don't read the docs because they don't care about
> > > performance, but most people who develop code that spends a lot of CPU
> > > cycles actually read the docs at least up to loop unrolling.
> >
> > Exactly my experience.
> >
> > Unfortunately there's no useful information on this topic in the GCC
> > manual...
>
> Well, we have too many switches really.  So the default is use -O2.  If you
> want extra speed, try -O3, or even better use profile feedback.  (Not many
> people realize that with profile feedback you get faster code than with
> -O3 and smaller code than with -Os - at least for C++ programs)

At work we use -O3 since it gives 5% performance gain against -O2.
profile-feedback has many flags and there is no overview of it in the
doc IIRC. Who will use it except GCC developpers? Who knows about your
advice?

The GCC user documentation is the place...

Well, I agree.  A GCC Optimization Guide would be a nice thing to have,
besides the individual flags documentation.  Of course unless someone is
volunteering...

Richard.

Reply via email to