This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

Re: Extremely bad performance compiling bzip2


> 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.
> 

Have you tried bzip2 compiled with gcc 2.7.2.3 and linked to glibc 2?
I know if there are many getc/putc's in the code, glibc 2 can much
slower than libc 5.

-- 
H.J. Lu (hjl@gnu.org)


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