Improve generic stpcpy performance

Adhemerval Zanella azanella@linux.vnet.ibm.com
Tue Dec 23 11:45:00 GMT 2014


On 22-12-2014 09:39, Richard Earnshaw wrote:
> I noticed while going through some benchmark results that the generic
> stpcpy was substantially slower than the simple_stpcpy in the benchmark
> itself.
>
> So, similar to Wilko's recent strcpy patch, this patch uses the same
> approach for stpcpy.
>
> Note that it does not help to use mempcpy, since that returns a value
> that points beyond the end of the copied data.
>
> OK?
>
> 	* string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy.
>
LGTM.



More information about the Libc-alpha mailing list