This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Recommended Optimization

> Hello Everybody
> I was wondering if it would be possible to create a section in the 
> documentation regarding recommended optimizations for platforms. ie Pentium 4 
> use:
> -O2 
> -march=pentium4 
> -fpmath=sse2

Many of these come with many "it depends" clauses attached.  One big
tradeoff is raw speed vs reliability: do you want to live on the bleeding
edge, or are you building code for a production system?

What gets the most testing is "-02" alone, in that we bootstrap that way
and a lot of GNU software is built with -O2 by default.  So you're less
likely to run into compiler bugs if you use -O2 than some random selection
of -m and -f flags that may never have been tried before.

If you use an -march flag, you get binaries that can only be run on one
architecture.  Still, it can help.  The various -mcpu= switches are much
better tested, though, as they get set by default to tune code to the
processor for which it is built.

The sse2 stuff is very promising, and I hope lots of people will test it,
but it's new.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]