Improve string benchtests
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 9 Apr 2019 10:54:34 +0000 (11:54 +0100)
committerWilco Dijkstra <wdijkstr@arm.com>
Tue, 9 Apr 2019 10:54:34 +0000 (11:54 +0100)
commit648279f4af423c4783ec1dfa63cb7b46a7640217
treefb9277130379baddc55546b600f2c1b0d4b947ad
parent93eebae5168e5cf2abfb4b6266e3fb2ab860cd60
Improve string benchtests

Replace slow byte-oriented tests in several string benchmarks with the
generic implementations from the string/ directory so the comparisons
are more realistic and useful.

* benchtests/bench-stpcpy.c (SIMPLE_STPCPY): Remove function.
(generic_stpcpy): New function.
* benchtests/bench-stpncpy.c (SIMPLE_STPNCPY): Remove function.
(generic_stpncpy): New function.
* benchtests/bench-strcat.c (SIMPLE_STRCAT): Remove function.
(generic_strcat): New function.
* benchtests/bench-strcpy.c (SIMPLE_STRCPY): Remove function.
(generic_strcpy): New function.
* benchtests/bench-strncat.c (SIMPLE_STRNCAT): Remove function.
(STUPID_STRNCAT): Remove function.
(generic_strncat): New function.
* benchtests/bench-strncpy.c (SIMPLE_STRNCPY): Remove function.
(STUPID_STRNCPY): Remove function.
(generic_strncpy): New function.
* benchtests/bench-strnlen.c (SIMPLE_STRNLEN): Remove function.
(generic_strnlen): New function.
(memchr_strnlen): New function.
* benchtests/bench-strlen.c (generic_strlen): Define for WIDE.
(memchr_strlen): Likewise.
ChangeLog
benchtests/bench-stpcpy.c
benchtests/bench-stpncpy.c
benchtests/bench-strcat.c
benchtests/bench-strcpy.c
benchtests/bench-strlen.c
benchtests/bench-strncat.c
benchtests/bench-strncpy.c
benchtests/bench-strnlen.c
benchtests/bench-wcsnlen.c