A couple of platform compatibility issues...
gschafer at zip.com.au
Sun Jan 5 15:48:14 PST 2003
On Sun, Jan 05, 2003 at 04:08:08PM -0700, Jeremy Herbison wrote:
> The difference between -O3 and -O2 is mostly that -O3 unrolls all loops of
> known length at compile time, resulting in larger but sometimes faster
yes, we all know that :) But that is not the issue. The issue is that
starting with the gcc-3 series of compilers, code compiled with -O3 is often
slower than -O2, not always, but often. gcc hackers acknowledge this. Even
our very own MSB has proven it. (see blfs-dev archives)
> binaries. The thing is, most well-written software (such as the linux kernel
> for instance) tends to use inline functions where necessary anyhow, so even
> with -O2 those functions are inlined as the developers intend. My assumption
> is that some packages do not use any inline funtions in the source code, so
> they often benefit from -O3, and many of these infact use -O3 by default (I
> know for a fact that openssl is like this and runs MUCH faster with -O3.
I dispute that. I played around with the openssl speed benchmarking option
recently and did not see any significant speed increase (using gcc-3.2.1)
> mysql also recommends compiling with -O3). As a rule I therefore personally
> compile with -O2 unless a package defaults to -O3.
> Since we don't recommend anything other than default compile flags though,
> lets just not mess with this one k? :)
Nobody is suggesting that. I just mentioned it coz this is a classic example
of an older package where the compiler options were composed long before
gcc-3 came into existence and therefore may not be appropriate anymore.
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev