On Tue, Mar 13, 2001 at 07:41:40AM -0800, David O'Brien wrote:

> Where did you even get the idea "-O6" did *_ANYTHING_*??  Don't people
> ever read the documentation anymore.  

Well, yes.  But I think that with the pgcc patches floating around that do
use -ON N <= 9 or so.. people might get confused.

> Do people ever actually test this?  Or is there just the assumption that
> the more "optimizations" on the `cc' command line is a Great Thing(tm)?

Yes.

> People do realize that for some code, -O2 is much worse than -O?  Also
> for much code there is no difference in performance.  Rather than do what
> you "think" will give the best results, why not actually benchmark it?

Well, yes.  I was actually curious about this, and if you search the gcc
ml archives (gcc.gnu.org) there are people who've been working on this.  
There was an interesting example of some fp code compiled with -O, -O2,
-O2 -fomit-frame-pointer.  With the extra register saved with
-fomit-frame-pointer -O2 was able to do some neat stuff.

Of course -O2 turns on most of the optimizations, but I wonder which ones
are causing incorrect code generation, and which ones really do help.  
Hmm.

- alex

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to