This is the mail archive of the libc-alpha@sources.redhat.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]
Other format: [Raw text]

Re: i386 inline-asm string functions - some questions


On Sun, Dec 28, 2003 at 09:55:33PM -0800, Zack Weinberg wrote:
> 
> > > ... however, that advantage is only theoretical.  Experiments such as
> > > Peter Zaitsev's just now, and mine several years ago, demonstrate that
> > > the bits/string.h and bits/string2.h inlines make code worse, not better.
> > > Therefore they should be removed.
> >
> > Funny, I conducted this experiment last week and found quite the
> > opposite.  Compiling the demangler and a smallish yacc parser
> > with -D__NO_STRING_INLINES cost about 20% in runtime.
> 
> That's interesting.  My testing was with much larger programs where
> str* / mem* aren't the bottleneck anyway.  I wonder if you would be
> willing to take a look at the differences in the assembly language
> and see where that 20% is coming from.

Sorry; I tried, but there were so many differences that I couldn't
characterize it.  If you care enough to try yourself, check out
drow-cplus-branch for GDB, configure, and make -C gdb test-cpnames. 
cp-names-main.tab.o is the object of interest.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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