Re: i386 inline-asm string functions - some questions
"Zack Weinberg" <[email protected]> Mon, 29 Dec 2003 11:09:14 -0800
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
Denis Zaitsev <[email protected]> writes: > On Mon, Dec 29, 2003 at 12:31:52AM -0500, Daniel Jacobowitz wrote: >> 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. > > -D__NO_STRING_INLINES just puts the inlining off. But nobody here > tells about the inline/noinline comparing. Of course, inlining is > better at speed. The comparison is doing between some versions of the > inlining. No. There is no "of course" here. If your inlined functions blow out the instruction cache, it may wind up being a net lose. Same if the out-of-line memcpy takes several more instructions to set up but makes damn sure to do aligned memory accesses (full-bus-width loads, nontemporal store, prefetches, etc etc etc), whereas the inline one doesn't. zw