glibc/sysdeps/aarch64/multiarch
Shuo Wang 28f2ce2772 aarch64: revert memcpy optimze for kunpeng to avoid performance degradation
In commit 863d775c48, kunpeng920 is added to default memcpy version,
however, there is performance degradation when the copy size is some large bytes, eg: 100k.
This is the result, tested in glibc-2.28:
             before backport  after backport	 Performance improvement
memcpy_1k      0.005              0.005                 0.00%
memcpy_10k     0.032              0.029                 10.34%
memcpy_100k    0.356              0.429                 -17.02%
memcpy_1m      7.470              11.153                -33.02%

This is the demo
#include "stdio.h"
#include "string.h"
#include "stdlib.h"

char a[1024*1024] = {12};
char b[1024*1024] = {13};
int main(int argc, char *argv[])
{
    int i = atoi(argv[1]);
    int j;
    int size = atoi(argv[2]);

    for (j = 0; j < i; j++)
        memcpy(b, a, size*1024);
    return 0;
}

# gcc -g -O0 memcpy.c -o memcpy
# time taskset -c 10 ./memcpy 100000 1024

Co-authored-by: liqingqing <liqingqing3@huawei.com>
2021-01-21 16:44:15 +00:00
..
ifunc-impl-list.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
init-arch.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile AArch64: Improve strlen_asimd performance (bug 25824) 2020-07-17 15:07:23 +01:00
memchr_generic.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memchr_nosimd.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memchr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy_advsimd.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy_falkor.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy_generic.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy_thunderx2.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy_thunderx.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy.c aarch64: revert memcpy optimze for kunpeng to avoid performance degradation 2021-01-21 16:44:15 +00:00
memmove.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset_base64.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset_emag.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset_falkor.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset_generic.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset_kunpeng.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rtld-memset.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen_asimd.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen_mte.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00