www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/05/10:00:54

Date: Mon, 5 Feb 1996 16:50:14 +0200 (EET)
From: Martynas Kunigelis <algikun AT santaka DOT sc-uni DOT ktu DOT lt>
To: DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: GCC 2.7.2
Message-ID: <Pine.HPP.3.91.960205164738.7140A-100000@santaka.sc-uni.ktu.lt>
MIME-Version: 1.0


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019