delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/16/05:16:58

Date: Wed, 16 Sep 1998 12:16:57 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Arthur <arfa AT clara DOT net>
cc: DJGPP Mailing List <djgpp AT delorie DOT com>
Subject: RE: djgpp and optimizations
In-Reply-To: <000601bde0bf$801e80e0$844e08c3@arthur>
Message-ID: <Pine.SUN.3.91.980916121635.5874O-100000@is>
MIME-Version: 1.0

On Tue, 15 Sep 1998, Arthur wrote:

> > > Also when is djgpp going to officially support optimizations
> > for the pentium?
> >
> > When the GCC maintainers include them in the official GCC release.
> 
> How about gcc 2.8.1 (-mpentium, -march=pentium, -mcpu=pentium etc)?

These mainly change the compiler's decisions about which instructions
are more/less expensive in certain contexts.  Pentium-specific
optimizations in PGCC are much more than just that.

> What does -fstrength-reduce do, exactly, and why do some people report such
> a huge speed increase when using it?

-fstrength-reduce replaces expensive instruction by less expensive
ones.  For example, multiplication is replaced with additions or bit
shifts, etc.

The problem is that this usually needs extra registers, and x86 has a
few of them to spare.  If a function doesn't use too many registers,
then -fstrength-reduce can be a big win; but if they are all used,
-fstrength-reduce in a loop can mean a significant slowdown, since GCC
will have to constantly reload some of the regsiters.

- Raw text -


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