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]

Re: Extremely bad performance compiling bzip2


Andi Kleen <ak@muc.de> writes:

|> In muc.lists.egcs.misc, you wrote:
|> >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.
|> 
|> I am curious why. Does checking an uncongested lock really involve that
|> much overhead? 

The overhead is most likely in the function call.  getc/putc in glibc 2
are a real functions, whereas in libc 5 they are macros that only call a
real function on under/overflow.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org


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