lkml.org 
[lkml]   [1998]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: faster strcpy()
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

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.066 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site