Re: i386 inline-asm string functions - some questions
"Zack Weinberg" <[email protected]> Sun, 28 Dec 2003 21:55:33 -0800
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
> > ... 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