Date: Wed, 23 Sep 1998 14:16:21 +0300 (IDT) From: Eli Zaretskii To: "John S. Fine" cc: djgpp AT delorie DOT com Subject: Re: Optimizations In-Reply-To: <3606914B.62A6@erols.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 21 Sep 1998, John S. Fine wrote: > > One thing that sometimes helps in C is to explicitly tell the compiler > > that the functions called inside the loop have no side effects, by > > declaring it with __attribute__((const)). This is described in GCC docs, > > and sometimes has a dramatic effect on code generated for loops that call > > functions. > > All of my routines in the entire project have side effects. Then you cannot expect GCC to be clever about optimizing loops that call these functions. Perhaps rewriting some of them to avoid side effects is something you could consider.