This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: Extremely bad performance compiling bzip2
- To: osku@iki.fi (Osku Salerma)
- Subject: Re: Extremely bad performance compiling bzip2
- From: hjl@lucon.org (H.J. Lu)
- Date: Mon, 7 Dec 1998 14:30:29 -0800 (PST)
- Cc: egcs@egcs.cygnus.com, libc-hacker@cygnus.com (GNU C Library)
> 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)