delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/16/14:01:53

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Newsgroups: comp.os.msdos.djgpp,gnu.gcc.help
Subject: GCC 3.03 makes slow code
From: no spam <no AT spam DOT com>
Message-ID: <Xns9198D540C7BFCgd678bcz5bAA@192.89.123.233>
User-Agent: Xnews/4.06.22
X-No-Archive: yes
Lines: 19
Date: Wed, 16 Jan 2002 18:53:25 GMT
NNTP-Posting-Host: 194.251.251.65
X-Trace: read2.inet.fi 1011207205 194.251.251.65 (Wed, 16 Jan 2002 20:53:25 EET)
NNTP-Posting-Date: Wed, 16 Jan 2002 20:53:25 EET
Organization: Sonera corp Internet services
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I was testing the latest GCC 3.03 (djgpp) and compiled an application
using switches -O9 -fomit-frame-pointer -mcpu=pentium -fschedule-insns2
-fexpensive-optimizations the code it generated run 10-20% slower (on 
Celeron-A CPU) compared to a version compiled with GCC 2.95 (using 
identical switches).

Adding -mcpu=pentiumpro generated a slightly faster code (around 2%)
and I added switch -fno-unroll-loops to a few of the code files which
already had manually unrolled code which helped the GCC 3.03 a bit.
It's still far from the speed of binary made with GCC 2.95. The code
consisted mainly integer comparisons and a lot of memory access (like
sorting functions).

Could somebody help me with the switches? What switches I should add so
that GCC 3 would generate faster code for my CPU? If the problem can't
be solved with the switches, is there any hope that future 3.x versions
would generate significantly faster code? If not, is there a GCC version
planned with GCC 3.03 features without the new speed 'optimizations'
of GCC 3.03?

- Raw text -


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