From 8d2030d659791184ecac8de9d6e1403b316a94c2 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Thu, 23 Mar 2017 19:00:02 +0000 Subject: [PATCH] Add a new randomized memcpy test for copies up to 256 bytes. The distribution of the size and alignment is based on a trace of SPEC2006. Instead of repeating the same copy over and over again like the existing tests, it times several thousand different copies to more accurately estimate the overhead of branch prediction. * benchtests/Makefile (string-benchset): Add memcpy-random. * benchtests/bench-memcpy-random.c: New file. --- ChangeLog | 5 +++++ benchtests/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 86599d7b38..4ec8d83aec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-03-23 Wilco Dijkstra + + * benchtests/Makefile (string-benchset): Add memcpy-random. + * benchtests/bench-memcpy-random.c: New file. + 2017-03-23 Tulio Magno Quites Machado Filho * stdio-common/printf.h (register_printf_modifier): Change the diff --git a/benchtests/Makefile b/benchtests/Makefile index 81edf8a933..a96e9533b3 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -37,7 +37,7 @@ string-benchset := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \ strcat strchr strchrnul strcmp strcpy strcspn strlen \ strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \ strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok \ - strcoll memcpy-large memmove-large memset-large + strcoll memcpy-large memcpy-random memmove-large memset-large # Build and run locale-dependent benchmarks only if we're building natively. ifeq (no,$(cross-compiling))