[PATCH] Improve performance of strncpy
Wilco Dijkstra
wdijkstr@arm.com
Wed Aug 20 12:44:00 GMT 2014
Hi,
This patch improves strncpy performance by using memset to clear memory after the string when the
buffer is much larger than the copied string. This is better as memset is significantly faster than
a simple byte-loop. On bench-strncpy it is ~25% faster.
ChangeLog:
2014-08-20 Wilco Dijkstra <wdijkstr@arm.com>
* string/strncpy.c (strncpy): Improve performance by using memset.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Improve-performance-of-strncpy.txt
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140820/8c673c19/attachment.txt>
More information about the Libc-alpha
mailing list