This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Extremely bad performance compiling bzip2


I upgraded my system from libc5 and gcc 2.7.2.1 to glibc2 2.0.6 and
egcs 1.1.1 over the weekend. Everything seems to be working, but the
first thing that I did to test to see if egcs was any better at
optimizing than gcc was to recompile bzip2, version 0.1pl2 to be
exact.

I use the latest netscape distribution as the testfile, which is a 12M
.bz2 file. Using the command "time bzip2 -dc nav.tar.bz2 > /dev/null"
as the benchmark command, my old bzip2 binary, compiled with gcc
2.7.2.1 and linked to libc5, does it in 33-35 seconds.

The flags used to compile with the old gcc were "-O3
-fomit-frame-pointer -funroll-loops", which are the default ones in the
bzip2 distribution.

To make a long story short, compiling with egcs 1.1.1 and those same
flags and linking against glibc2, I get a running time of 58-63
seconds. Adding "-mcpu=pentiumpro" to the flags I get down to 52-53
seconds. (My machine is a K6/233 with 96M of memory). That's still 50%
slower than plain old gcc.

Is there something I'm doing wrong, or should I just accept that bzip2
compiled with egcs is dog slow? I did some tests with gzip too
afterwards, and gzip compiled with egcs is in the +-1% range with my
old gzip.

--
Osku Salerma - osku@iki.fi - http://www.iki.fi/osku/
I'd give my right arm to be ambidextrous.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]