Messages in this thread | | | Date | Fri, 24 Apr 1998 08:49:19 -0400 | From | Daniel S Cox <> | Subject | Re: 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
| |