Re: [2.6 patch] add a config option for -Os compilation

From: Alan Cox
Date: Sun Sep 14 2003 - 09:59:56 EST


On Sul, 2003-09-14 at 14:53, Wade wrote:
> Adrian Bunk wrote:
> > The patch below adds a config option OPTIMIZE_FOR_SIZE for telling gcc
> > to use -Os instead of -O2. Besides this, it removes constructs on
> > architectures that had a -Os hardcoded in their Makefiles.
>
> Someone told me that -Os is actually faster than -O2 for Athlons, is
> that true?

On gcc 2.95 -Os was faster for most stuff. I would intuitively expect
the best result to be a mix varied by function but I don't think gcc has
the support to do that.

I've also not benched gcc 3.2 -Os v -O2 at real workloads - thats a
nice little project for someone.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/