diff options
author | Xuelei Zhang <zhangxuelei4@huawei.com> | 2019-12-19 13:41:40 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-12-19 16:31:04 -0300 |
commit | c2150769d015dca1805334af7743829f1e4c0b6a (patch) | |
tree | 9a57061392d7a63e1696ab208005677b3968bfce /sysdeps/aarch64/multiarch/strlen.c | |
parent | 0db8e7b36665fa90c53161742dedab21d786924c (diff) | |
download | glibc-c2150769d015dca1805334af7743829f1e4c0b6a.tar.gz glibc-c2150769d015dca1805334af7743829f1e4c0b6a.tar.xz glibc-c2150769d015dca1805334af7743829f1e4c0b6a.zip |
aarch64: Optimized strlen for strlen_asimd
Optimize the strlen implementation by using vector operations and loop unrolling in main loop.Compared to __strlen_generic,it reduces latency of cases in bench-strlen by 7%~18% when the length of src is greater than 128 bytes, with gains throughout the benchmark. Checked on aarch64-linux-gnu. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'sysdeps/aarch64/multiarch/strlen.c')
-rw-r--r-- | sysdeps/aarch64/multiarch/strlen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/aarch64/multiarch/strlen.c b/sysdeps/aarch64/multiarch/strlen.c index 1db01babee..abf6513eee 100644 --- a/sysdeps/aarch64/multiarch/strlen.c +++ b/sysdeps/aarch64/multiarch/strlen.c @@ -34,7 +34,9 @@ extern __typeof (__redirect_strlen) __strlen_generic attribute_hidden; extern __typeof (__redirect_strlen) __strlen_asimd attribute_hidden; libc_ifunc (__strlen, - (USE_ASIMD_STRLEN () ? __strlen_asimd : __strlen_generic)); + (USE_ASIMD_STRLEN () || IS_KUNPENG(midr) + ? __strlen_asimd + :__strlen_generic)); # undef strlen strong_alias (__strlen, strlen); |