Re: faster strcpy()

ralf@uni-koblenz.de
Fri, 24 Apr 1998 13:02:05 +0200


On Fri, Apr 24, 1998 at 11:28:51AM +0100, Philip Blundell wrote:
> >As to why the above is faster in userland, that seems really odd. I would
> >assume the libc string copy to be something like:
>
> In glibc at least the string functions are quite sophisticated. Also gcc will
> use a builtin for easy cases which can confuse the issue.

Unfortunately the builtin string functions are often less efficient than
their library equivalents. GCC for example unrolls the loops less agressive
for __builtin_memcpy and deals less smart with special cases like less than
four byte alignment etc. Since I'm working on reimplementing those functions
anyway I'll for the fun benchmark the kernel with and without builtin
functions.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu