-O3 vs. -O2 (was Re: [ale] sharing an experience....debian....)

Bjorn Dittmer-Roche bjorn at sccs.swarthmore.edu
Thu Feb 12 07:55:20 EST 2004


On Wed, 11 Feb 2004, Jeff Hubbs wrote:

> There's another reason why I ask.  I frequently install Gentoo on slow
> machines because a) I want to wring every last bit of performance I can
> out of the hardware available and b) I'm not under time pressure to do
> so :)
>
> But, according to this, in doing so and accepting the -O3 optimization
> suggested, I may only be hurting myself, ESPECIALLY if after building
> gcc, glibc, etc. in the bootstrap phase with -O3 and subsequently
> compiling everything else with that gcc, it might be taking m hours
> (days?) longer than necessary.

I don't have a good answer to this, but in my own tests of -O2 vs. -O3
with some complex C++ code I got a HUGE improvement with -O3, so now I
alays use it. On the advice of other suggestions on this list, I might try
the -fnounroll-loops, though. It's also possible that more optimization
works better with C++.

	bjorn



More information about the Ale mailing list