about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/xstat64.c
diff options
context:
space:
mode:
authorShuo Wang <wangshuo47@huawei.com>2021-01-20 15:20:44 +0800
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-01-21 16:44:15 +0000
commit28f2ce27722d890a884cc7fa2f6d2bc0cb418f26 (patch)
tree5a8592c5cd46ddb33b68fc2e67d93c0cd3c06edc /sysdeps/mach/hurd/xstat64.c
parent2682695e5c7acf1e60dd3b5c3a14d4e82416262c (diff)
downloadglibc-28f2ce27722d890a884cc7fa2f6d2bc0cb418f26.tar.gz
glibc-28f2ce27722d890a884cc7fa2f6d2bc0cb418f26.tar.xz
glibc-28f2ce27722d890a884cc7fa2f6d2bc0cb418f26.zip
aarch64: revert memcpy optimze for kunpeng to avoid performance degradation
In commit 863d775c481704baaa41855fc93e5a1ca2dc6bf6, 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>
Diffstat (limited to 'sysdeps/mach/hurd/xstat64.c')
0 files changed, 0 insertions, 0 deletions