delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/20/22:17:31

From: Rob Vasquez <digital DOT fx AT worldnet DOT att DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP 1 -> DJGPP 2 -> slower program speed?
Date: Mon, 20 Jan 1997 20:35:36 -0500
Organization: Digital Fx
Lines: 23
Message-ID: <32E41D68.886@worldnet.att.net>
References: <32E3510B DOT 29AF AT active DOT ch>
NNTP-Posting-Host: 207.147.60.132
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> But my disappointment was big. My program is about 20 times
> slower using DJGPP 2 than DJGPP 1! I used the same compiler-
> options (-O2 -m486) I also tryed by using -O6. But the speed
> was the same: *much* slower. BTW I use GRX2.0 also.
> 
> Who can help me make my prog faster (as fast as in DJGPP 1)?

From the djgpp FAQ:
------------------------------------------------------------------------In general, GCC 2.7.2 which comes with DJGPP v2.0 generates tighter, 
faster code.  But it sometimes produces buggy code when "strength 
reduction" optimizations are enabled.  So DJGPP by default disables this 
kind of optimization, which might sometimes yield slower code.  If you 
need extra speed, first debug your program with default optimization 
options, and then recompile with -fstrength-reduce switch to see if that 
makes any difference.

GCC has a plethora of other optimization options which might make your 
code faster; the best way to know is to profile and experiment.
-------------------------------------------------------------------------- 
               Rob Vasquez
               Digital Fx '97
               
   email:   digital DOT fx AT worldnet DOT att DOT net

- Raw text -


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