Re: gcc -O2 vs gcc -Os performance

John Bradford
2003-02-06T21:24:42Z

> >> All done with gcc-2.95.4 (Debian Woody). These machines (16x NUMA-Q) have
> >> 700MHz P3 Xeons with 2Mb L2 cache ... -Os might fare better on celeron
> >> with a puny cache if someone wants to try that out
> >
> > gcc 3.2 is a lot smarter about -Os and it makes a very big size
> > difference according to the numbers the from the ACPI guys.
> >
> > Im not sure testing with a gcc from the last millenium is useful 8)
>
> Still no use.
> /me throws gcc-3.2 in the trash can.

What submodel options are you using? If you're compiling with
-march=i386, I wouldn't expect -Os to have much effect.

Note that, of all architectures, GCC is almost certainly most
efficient on IA-32. Although I haven't done any benchmarks against
other compilers on $arch!=IA32, the ones I've seen claim that the
native compiler generates much better code.

John.