wcsmbs: optimize wcsncpy

System Internals / glibc - Adhemerval Zanella [linaro.org] - 27 February 2019 13:00 EST

This patch rewrites wcsncpy using wcsnlen, wmemset, and wmemcpy. This is similar to the optimization done on strncpy by f6482cf29d and 6423d4754c.

Checked on x86_64-linux-gnu.

- wcsmbs/wcsncpy.c (__wcsncpy): Rewrite using wcsnlen, wmemset, and wmemcpy.

30a7e2081c wcsmbs: optimize wcsncpy
ChangeLog | 3 +++
wcsmbs/wcsncpy.c | 60 ++++----------------------------------------------------
2 files changed, 7 insertions(+), 56 deletions(-)

Upstream: sourceware.org


  • Share