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.
This commit is contained in:
Wilco Dijkstra 2017-03-23 19:00:02 +00:00
parent ca4dc74659
commit 8d2030d659
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2017-03-23 Wilco Dijkstra <wdijkstr@arm.com>
* benchtests/Makefile (string-benchset): Add memcpy-random.
* benchtests/bench-memcpy-random.c: New file.
2017-03-23 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* stdio-common/printf.h (register_printf_modifier): Change the

View File

@ -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))