lkml.org 
[lkml]   [1998]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: faster strcpy()
Riley,

At 12:11 PM 4/24/98 +0100, Riley Williams wrote:
>Hi Chris.
>
> > As to why the above is faster in userland, that seems really odd. I
> > would assume the libc string copy to be something like:
>
> > char *strcpy(char *a,char*b)
> > {
> > char c = b;
> > while(*a++ = *b++);
> > return c;
> > }
>
>That would return the wrong value, but replace the "char c=b" with
>"char c=a" and you have the standard implementation.

Almost correct. Make it "char *c=a", and you have the std imp.

Danny



-
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.062 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site