This is the mail archive of the
mailing list for the GCC project.
Re: Recommended Optimization
- From: Joe Buck <Joe dot Buck at synopsys dot com>
- To: ben at echotech dot ca (Ben Woodhead)
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 23 May 2002 15:02:08 -0700 (PDT)
- Subject: 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
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.