www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/28/10:27:07

Date: Thu, 28 Nov 1996 17:16:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Glen Miner <gminer AT Newbridge DOT COM>
Cc: djgpp AT delorie DOT com
Subject: Re: Optimization
In-Reply-To: <Pine.SUN.3.90.961128074953.29701C-100000@coop10>
Message-Id: <Pine.SUN.3.91.961128170154.9191B-100000@is>
Mime-Version: 1.0

On Thu, 28 Nov 1996, Glen Miner wrote:

> > There's a whole chapter on optimization options in the GCC on-line docs.  
> 
> Hmm, I was skimming through the info directory and couldn't find exactly 
> what I was looking for. I'll look closer.

Type this from the DOS prompt:

	info gcc invoking optimize

> Hmm, I'll look into this. I'm not so sure that I can do without a frame 
> pointer, though. How would it use local variables then?

Trust GCC, it can.

> > Mixing 16-bit and 32-bit code will usually *slow down* your program by 
> > about a factor of 2, due to the override prefixes which eat up a cycle.
> 
> This is quite odd. I'm going to have to re-read the old pmode optimizing 
> doc I have lying around somewhere.

This has nothing to do with PM vs RM (except that most RM code uses 
16-bit instructions).  The issue here is that using 16-bit instructions 
in a middle of 32-bit code requires an operand size prefix and/or and 
address size prefix, and each of these eats up one cycle on an i486 (0 on 
an i386, and I don't have information about the Pentium and Pro).

- Raw text -


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