Mail Archives: djgpp/1996/02/05/10:00:54
On Mon, 5 Feb 1996, Eli Zaretskii wrote:
>
> On Sun, 4 Feb 1996, Charles Sandmann wrote:
>
> > Actually, -O3 inlines everything in sight, including static routines (and
> > even non-static ones in the same module). So the executable may get much
> > larger in size. Unless you use lots of tiny routines, I prefer -O2.
>
> My experience is that -O3 almost never makes things better, except,
> maybe, when compiling a well-modularized library.
>
> When in doubt, I usually make it both ways and time the results.
>
I've exampless when -O3 is better. Height Field demo from x2ftp.oulu.fi
/pub/msdos/programming/djgpp2. I recompiled the sources with -O3 and exec is
120% faster than the original exec in the package. Well, as someone mentioned
before, there are lots of small functions there. Calling them just does
not pay...
Martynas Kunigelis
- Raw text -