[XviD-devel] *Ouch!* compiler option with Makefiles
Christoph Lampert
xvid-devel@xvid.org
Fri, 25 Oct 2002 13:18:47 +0200 (CEST)
On Fri, 25 Oct 2002, Christoph Lampert wrote:
> yOn Thu, 24 Oct 2002, Edouard Gomez wrote:
> > > I guess Gomgom, you switched to -Os. Is the situation vice versa on your
> > > machine?
> >
> > I had neither speed loss nor speed gain, and a lkml thread showed that
> > -Os was giving better results for the kernel... so i switched to -Os,
> > but if it results in a speed loss for other people... well sorry, i'll
> > switch them back to -O2 (or -O9 for the braves that do not fear sig11
> > ;-)
Okay, it's really compiler related. With gcc 2.95.2 and cactus I get same
encoding speed for -O2 and -Os and slightly (2%) higher decoding for -Os.
For gcc 3.2 and full PAL size -Os is much slower than -O2. I guess this is
tricky business of cache sizes etc...
Still, I'd like to switch to -O2 in the Makefiles using gcc because the
possibility of big slowdown is smaller that way.
Maybe I'll write a short shell script to benchmark all possible
combination of optimization flags and determine which is the fastest for
the current setting...
gruel