Mail Archives: pgcc/1999/03/04/06:43:12
Message-ID: | <001701be6634$045ba500$a18330d4@main.medtech.ru>
|
From: | "Eugene M. Indenbom" <bom AT classic DOT iki DOT rssi DOT ru>
|
To: | <pgcc AT delorie DOT com>
|
Subject: | gcc-2.7 creates faster code than pgcc-1.1.1
|
Date: | Thu, 4 Mar 1999 14:37:17 +0300
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.72.3155.0
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3155.0
|
Reply-To: | pgcc AT delorie DOT com
|
As I wrote previously gcc-2.7.2.3 generates faster gzip
than egcs-1.1.1/pgcc-1.1.1 on PentiumPro.
The slowdown is greater than 10% on decompression operation.
This can be easily checked if you have RedHat 5.2.
The shipped gzip is gcc-2.7.2.3 compiled.
After several day of search I finally find out offending
instruction that slow down gzip compiled with egcs-1.1.1/pgcc-1.1.1
on PentiumPro 180MHz (132MB RAM) but the result seems crazy to me.
This instruction is:
andl $255, %eax
in flush_window (util.c) function body (it is inlined from updcrc)
if you manually replace it with
movzbl %al, $eax
this will boost decompression by 20%.
All the below staff is made in gzip-1.2.4a source folder.
$ make CFLAGS="-O6 -mpentiumpro"
$ time ./gzip -cd egcs-1.1.1.tar.gz > /dev/null
real 0m8.047s
user 0m7.970s
sys 0m0.070s
$time ./gzip -c egcs-1.1.1.tar.gz > /dev/null
real 0m12.646s
user 0m12.470s
sys 0m0.160s
$
gcc -c -DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 -O6 -mpentiumpro
util.c -S
$ sed 's/andl $255,%eax/movzbl %al, %eax/g' util.s > util.S
$
gcc -c -DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 -O6 -mpentiumpro
util.S
$ make CFLAGS="-O6 -mpentiumpro"
$ time ./gzip -cd egcs-1.1.1.tar.gz > /dev/null
real 0m6.658s
user 0m6.540s
sys 0m0.110s
$ time ./gzip -c egcs-1.1.1.tar.gz > /dev/null
real 0m12.688s
user 0m12.490s
sys 0m0.180s
All this staff do not apply to Pentium processor as far as I know
(I test it Pentium MMX 200MHz)
I do not know why this happens.
Anybody who knows how to deal with it, please, reply me
as soon as possible.
And finally if you have Pentium Pro or Pentium II please
do this check and report result to me.
I wonder whether I have brain damaged Pentium Pro.
Sincerely Yours, Eugene.
- Raw text -