This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH]: Unlock the stdio streams


 > This patch uses the new unlock_stream() libiberty function on the
 > stdio streams for the executables in the gcc directory.
 > 
 > As expected, it has more impact for programs which do a lot of i/o to
 > the standard streams relative to other tasks.  Also, for any speedup
 > significant i/o must go through various *printf routines since the
 > other stdio functions use the unlocked variants, whereas (at least)
 > glibc doesn't have unlocked versions of *printf.
 > 
 > E.g. genrecog, which does a lot of plain printf to stdout, becomes
 > about 1% faster on i686-unknown-linux-gnu.  A full bootstrap was a
 > couple of seconds faster but that's just noise.


Another benchmark, when I send the -S output to stdout using "-o -", I
get another ~0.3% speedup compiling dwarf2out.c at -g -O0.  This is on
top of the speedups gained from previous unlocking patches.

(I believe GCC does "-o -" behind the scenes e.g. when using -pipe.)

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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