www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/07/20/11:43:17

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Message-Id: <3.0.32.19980720133355.009354b0@xs4all.nl>
X-Sender: diep AT xs4all DOT nl (Unverified)
X-Mailer: Windows Eudora Pro Version 3.0 (32)
Date: Mon, 20 Jul 1998 13:33:58 +0000
To: beastium-list AT Desk DOT nl
From: Vincent Diepeveen <diep AT xs4all DOT nl>
Subject: speed PGCC vs GCC for DIEP
Mime-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 79

Hello,

I compared the speed of pgcc to gcc 2.7.2.3/2.8.1. 
I wonder what optimizations i can try. My program does 
NOT use any float, only integers and unsigned chars.

I'd be glad to receive additional optimizations i can try on it, and also
how can i dissassemble the code of pgcc, so that i can report what can be
improved during optimization (if assume like to receive this)?

This is what i get if i export the path with /usr/local/bin in front.

# gcc -v

/usr/local/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.90.29/specs
gcc version pgcc-2.90.29 980515 (egcs-1.0.3 release)

Here the makefile and notes about speed are written by CFLAGS.

# Makefile for DIEP (c) 1994-1998
target  = LINUX
CC      = gcc
#CC       = egcs

#CFLAGS  = -mpentiumpro -O6 -Wall       this is around 15% slower than gcc
#CFLAGS = -mpentium -O6                 around 25% slower than gcc
#CFLAGS = -O                            about 1.5% slower than gcc
#CFLAGS = -O2                           exactly equal to gcc
#CFLAGS = -O2 -mpentium                 almost equal to gcc 2.7.2.3 and 2.8.1
#CFLAGS  = -O2 -mpentiumpro             little slower than gcc, 1.5%. WEIRD!
#CFLAGS  = -O3 -mpentium                1.5% slower than gcc
#CFLAGS  = -O -mpentiumpro              also slower than gcc, 2%.

objects = diepab.o diepasci.o diepbook.o diepdbas.o diepegtb.o diepeind.o \
        diepeval.o diepexec.o diepgame.o diepinit.o diepmove.o dieprand.o \
        diepslow.o diepsort.o dieptabl.o dieptime.o

includes = diep.h function.h data.h

diep:   $(objects) $(includes)
        $(CC) $(CFLAGS) -o diep $(objects)

clean:
        -rm -f *.o diep

$(objects): $(includes)

..c.o:   $(includes)
        $(CC) $(CFLAGS) -c $*.c
----------------------------------------------------------------------------

First of all: it seems that -O6 doesn't work at all. Also very dissappointing
is the pentium pro optimization. Just like it's dissappointing in gcc,
in pgcc it also gives nothing, which is to say at least *weird*.

How can a program running on a P6-200Mhz be not faster, yes even
SLOWER when optimized for P6, than when it does only carry -O2? In gcc i
saw the same problem: it didn't became faster at all.

In contradiction to gcc with pgcc i can clearly measure different speeds.
In gcc it doesn't matter what string i give it, only -O and -O2 matter,
and further it doesn't matter at all.

For PGCC the best working optimization so far was -O2
When i used -O2 -mpentium it became slower!
Really horrible was -O2 -mpentiumpro it became 1.5% slower than -O2.

If i can dissassemble i'll be able to show a few problems of pgcc.

I really DON'T understand why the pentium pro optimization code works so
bad. It really should speed up things a lot. There are so many obvious things
that work way faster on pro compared to pentium/486.

Yet 486 optimization seems give me the fastest code on the pentium pro.

There is some work to do!

Greetings,
Vincent

- Raw text -


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