delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/29/23:33:24

Date: Wed, 30 Mar 94 13:05:36 CST
From: michaels AT vsl DOT com DOT AU (Michael Snoswell)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: GCC optimization & target options?

 
> > 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
> 
> -m486 changes the ORDER of instructions.... there are very few instructions
> that the 486 has that the 386 doesnt (2 or 3 I think) and those are really
> only important when writing operating systems (or DOS extenders I spose).

It also substitutes some single instructions with 2 instructions that together 
run faster on the 486.

> > 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 is a ass.  (Apologies to Dickens).  Again, the Pentium doesn't have
> that many new instructions; the difference is in the timing that changes
> depending upon how you order the instructions.  With the Pentium, you can
> schedule two instructions so that they are executed simultaneously (this
> somewhat super scalar approach is what gives the pent some of it's speed
> up).  Only certain instructions can be  executed simultaneously, however,
> and Intel makes those who want to know that info sign non-disclosure forms.
> Since GCC is available in source, it's kind of disclosed... therefore....

In an article in DDJ last year, in an interview with a guy from Watcom, it was
stated that optimising for the 486 in Watcom C/C++ 9.5 sped up code from 5-15%.
DJGPP goes about 5% faster on average (code is also 5% bigger) but it really
does depend on what your program is doing. Watcom optimising for the Pentium
was stated to run 15-40% faster mainly due to keeping the pipeline full. This
optimised code also ran slghtly faster than unoptimised code on the 486. On the
386 it didn't make any difference.

I haven't tried Watcom against DJGPP but I'm told it does run faster but the
comparison can't be made on a 486/Pentium opimisation basis alone.

cheers
	Michael Snoswell

- Raw text -


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