delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/30/10:28:52

Date: Wed, 30 Mar 94 10:00:39 -0500
From: dj AT ctron DOT com (DJ Delorie)
To: FIXER AT FAXCSL DOT DCRT DOT NIH DOT GOV
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: GCC optimization & target options?

> I've been fiddling with the -O and -m options to GCC, and have been getting
> some startling results.  First, my compilation times don't change between
> using -O0 and -O2.  This is for a project made up of about a dozen files;
> it takes almost exactly one minute to compile and link from scratch.

only a minute?  You won't notice the difference perhaps, then.  I
notice it a lot when compiling gcc, which takes half an hour.  Also,
you won't notice it if your functions are simple and/or small - large
complex functions optimize more.

> Also, there doesn't seem to be *any* difference in code size between
> using the -m486 and -mno-486 options to gcc.  Is this an artifact of
> the COFF file format, or is there really no difference?  Or is it just
> my particular code doesn't change when the codegen parameters are
> tweaked?  (The final linked COFF file is around 80K in size.)

COFF pads to a 4K boundary.  -m486 changes the *selection* of opcodes,
not the number of them.  The size rarely changes by a significant
amount, and the difference is about a 5% improvement in performance.

> On a similar note, is there a gcc out that does Pentium optmization
> yet?  I notice that the Info lists a bunch of PowerPC target-specific
> options, but no P5 options.

Intel has done a P5 port, but it is non portable so hasn't been
accepted by the FSF.  Or, so I've been told.


- Raw text -


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