This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 inline-asm string functions - some questions
> > ... 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.
zw