Date: Tue, 2 Mar 1999 13:03:52 -0600 (CST) From: Dustin Marquess To: "Eugene M. Indenbom" cc: "'pgcc AT delorie DOT com'" Subject: Re: gcc-2.7.0 creates faster code than pgcc-1.1.1 In-Reply-To: <01BE64C5.8B5FD140@valya.iki.rssi.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: pgcc AT delorie DOT com On Tue, 2 Mar 1999, Eugene M. Indenbom wrote: > I make gzip using pgcc with the following oprions: > > make CC="/home/ddict/glibc/pgcc-1.1.1/gcc/xgcc -B/home/ddict/glibc/pgcc-1.1.1/gcc/" \ > CFLAGS="-Os -fomit-frame-pointer -mpentiumpro -march=pentiumpro -fno-exceptions > -malign-loops=2 -malign-jumps=2 -malign-functions=2" > > This combination appears to produce the fastest code I can get on my Pentium Pro 180MHz (192MB RAM): > > $ time ./gzip -cd egcs-1.1.1.tar.gz > /dev/null > > real 0m7.296s > user 0m7.170s > sys 0m0.130s > > But gzip that I get from very old Slackware distribution (1995) works > much faster. It was compiled with gcc-2.7.0 -O2 and works more than 5% faster! > > $ time /bin/gzip -cd egcs-1.1.1.tar.gz > /dev/null > > real 0m6.942s > user 0m6.730s > sys 0m0.210s > > Stock egcs-1.1.1 looses competition too: > make CFLAGS="-Os -fomit-frame-pointer -mpentiumpro -march=pentiumpro -fno-exceptions > -malign-loops=2 -malign-jumps=2 -malign-functions=2" > > $ time ./gzip -cd egcs-1.1.1.tar.gz > /dev/null > > real 0m7.571s > user 0m7.350s > sys 0m0.230s > > I send you this fancy executable as attachment and really want to know > how can this be, why we loose 5% of speed in the 2.9.x gcc code using > all optimizations invented during past 4 years? > > Sincerely Yours, Eugene. > > P.S. I am not subscribed to this mailing list -Os optimizes for smallest binary size, not speed.. Try: CFLAGS="-O6 -fomit-frame-pointer -mpentiumpro -march=pentiumpro -fno-exceptions -pipe -s -malign-loops=2 -malign-jumps=2 -malign-functions=2" LDFLAGS="-s" Also, is this old Slackware still a.out, or is it one of the ELF versions? ELF can be 1-5% slower than a.out.. Thanks, -Dustin