[PATCH 0/1] LoongArch: Add optimized functions.
dengjianbo
dengjianbo@loongson.cn
Fri Sep 16 07:16:41 GMT 2022
Tested on LoongArch machine 3A5000: gcc 12.1.0, Linux kernel 5.19.0 rc5, binutils 2.38.50, All cases are passed besides ifunc related tests, no new failed entry was introduced.
configure:
../configure --prefix=/usr CFLAGS="-O2"
make bench:
comparing with improved generic string version resent in https://sourceware.org/pipermail/libc-alpha/2022-September/141833.html , test results can be found in following link:
https://github.com/jiadengx/glibc/tree/main/make_bench_v2
strchr
About 30% faster than improved generic version, detailed info can be found from strchr_xls.png and graph-strchr.
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/graph-strchr
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/strchr_xls.png
strchrnul
About 30% faster than improved generic version, detailed info can be found from strchrnul_xls.png and graph-strchrnul.
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/graph-strchrnul
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/strchrnul_xls.png
strcmp
About 10% - 60% faster than improved generic version, detailed info can be found from strcmp_xls.png and graph-strcmp.
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/graph-strcmp
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/strcmp_xls.png
strncmp
About 0% - 80% faster than generic version, detailed info can be found from strncmp_xls.png and graph-strncmp.
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/graph-strncmp
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/strncmp_xls.png
memmove
About 5% - 60% faster than improved generic version, detailed info can be found from memmove_xls.png and graph-memmove
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/graph-memmove
https://github.com/jiadengx/glibc/blob/main/make_bench_v2/memmove_xls.png
dengjianbo (1):
LoongArch: Add optimized functions
sysdeps/loongarch/lp64/memmove.S | 485 +++++++++++++++++++++++++++++
sysdeps/loongarch/lp64/strchr.S | 124 ++++++++
sysdeps/loongarch/lp64/strchrnul.S | 133 ++++++++
sysdeps/loongarch/lp64/strcmp.S | 207 ++++++++++++
sysdeps/loongarch/lp64/strncmp.S | 278 +++++++++++++++++
5 files changed, 1227 insertions(+)
create mode 100644 sysdeps/loongarch/lp64/memmove.S
create mode 100644 sysdeps/loongarch/lp64/strchr.S
create mode 100644 sysdeps/loongarch/lp64/strchrnul.S
create mode 100644 sysdeps/loongarch/lp64/strcmp.S
create mode 100644 sysdeps/loongarch/lp64/strncmp.S
--
2.31.1
More information about the Libc-alpha
mailing list