Re: i386 inline-asm string functions - some questions
Andrew Pinski <[email protected]> Sun, 28 Dec 2003 22:54:19 -0500
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
On Dec 28, 2003, at 22:35, Ulrich Drepper wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Zack Weinberg wrote: >> I once tried to get Uli to take them out again, with >> hard numbers to back me up, but he ignored me. > > I have absolutely no problem taking out the inlines once gcc is able to > perform the same optimizations. Problem is that nobody spent the time > so far to complete the task in gcc. As far as I know each function we > still have has an advantage over the gcc code. > > Just look at the inlines to determine what is optimized, do it in gcc, > and let me know. Then I'll remove the inline. We already do more when it comes to removing sqrt and other math functions and also some string functions we optimize without the need for the string instructions. In fact GCC does more optimizations on string functions than glibc does already. The functions that GCC does not optimize that glibc does are the following: memrchr strncat (we do sometimes) strncmp strchr (with a FIXME in GCC) strchrnul strcspn strspn strpbrk strstr (we do a better job for "a", but we do not do it for the general case) The common cases of strcpy, memcpy, etc. we do optimize greatly and as the math library we do too. Thanks, Andrew Pinski