German Jose Gomez Garcia (
Mon, 02 Mar 1998 16:44:52 +0100 (MET)

Well, the thing is simple, I have recently get a new PII Dual,
and decided to compile a new whole system with the new compilers, and
optimize it for pentiumpro, but I had lot of problems (mainly with
the -march=pentiumpro option), and as I test different programs I got
more and more puzzled, so I thought of test the compilers themselves,
I used the bzip2 compressor (patch level 1.2). The results are very
strange, judge by yourself:

I compress a tar file of my /lib dir, (so most of it is binary)
I run the program ten times for compression and another ten times for
descompression, multiply the time for the processor use and divide the
sum of every test by 1000, it was run in a PII 300 (75x4) dual with
128 Mb of RAM, so most of the work took place in ram (no other process
but the standards init, tcsh, agetty, etc), using kernel 2.1.89 pre5, all
the compilers were recompiled by themselves. The total times for compress +
descompress were:

SlackWare 3.4 bzip2 : (I don't know what options Patrick used :)
libc 5.4.33 + gcc
22.64 s (56208 bytes)

GCC -O3 -fomit-frame-pointer -m486 -funroll-loops
libc 2.0.5c
23.57 s (67264 bytes)

GCC 2.8.0: -O3 -fomit-frame-pointer -mpentiumpro -funroll-loops
libc 2.0.6
24.76 (48900 bytes)

PGCC 1.0.1: -O3 -fomit-frame-pointer -mpentiumpro -funroll-loops
libc 2.0.6
26.88 (53200 bytes)

PGCC 980214: -O3 -fomit-frame-pointer -mpentiumpro -funroll-loops
libc 2.0.6
25.21 (75900 bytes)

The only clear thing is that nothing is clear!

Theorically better compilers (as PGCC and GCC) produce slower code
than my old gcc, I decided to use GCC 2.8.0, but I have no reasons
for this decision :). Other important thing is that neither gcc nor pgcc
produce good code when using -march=pentiumpro, many programs (for example
groff 1.11a and Mesa 2.6 just fail in the compiler stage, getting strange
things with conditional expressions involving double, but that is another
story), the best solution IMHO is keep our old compilers..., or no?

One O.S. to rule them all, | German Gomez Garcia
One O.S. to find them. |
One O.S. to bring them all |
and in the darkness bind them. | "Wur Qanar Wur Stilor Wur Kas"

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to