summaryrefslogtreecommitdiff
path: root/benchtests/bench-memmove.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2019-02-12 17:19:51 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2019-02-12 17:19:51 +0000
commit16f87cfd630522afe745a0cf665287b8fe206cf4 (patch)
tree9f33bc5ad9ad0bbf3f1975ce25019e6acdd1f183 /benchtests/bench-memmove.c
parent0c6d82e979d562147c9cfe0e6f65b42a904288bc (diff)
downloadglibc-16f87cfd630522afe745a0cf665287b8fe206cf4.tar.gz
String benchtest cleanup
Continue cleanup of the string benchtests. Remove simplistic byte-oriented versions with faster generic implementations. Remove bcopy/bzero benchmarks (bcopy/bzero are obsolete and never emitted by compilers). Remove builtin versions of memcpy, memset and strlen. Remove all remaining "stupid" implementations given they are always slower than the "simple" variants and thus don't add anything useful. * benchtests/bench-strcasecmp.c (stupid_strcasecmp): Remove. * benchtests/bench-strcasestr.c (stupid_strcasestr): Remove. * benchtests/bench-strchr.c (stupid_strchr): Remove. * benchtests/bench-strcmp.c (stupid_strcmp): Remove. * benchtests/bench-strcspn.c (stupid_strcspn): Remove. * benchtests/bench-strlen.c (builtin_strlen): Remove. * benchtests/bench-strncasecmp.c (stupid_strncasecmp): Remove. * benchtests/bench-strncmp.c (stupid_strncmp): Remove. * benchtests/bench-strpbrk.c (stupid_strpbrk): Remove. * benchtests/bench-strspn.c (stupid_strspn): Remove. * benchtests/Makefile: Remove bench-bcopy.c and bench-bzero.c. * benchtests/bench-bcopy.c: Delete file. * benchtests/bench-bzero.c: Likewise. * benchtests/bench-memccpy.c (stupid_memccpy): Remove. (simple_memccpy): Remove. (generic_memccpy): Add function. * benchtests/bench-memcpy.c: (builtin_memcpy): Remove. * benchtests/bench-memmove.c (simple_bcopy): Remove. * benchtests/bench-mempcpy.c (simple_mempcpy): Remove. (generic_mempcpy): Add new function. * benchtests/bench-memset.c (simple_bzero): Remove. (builtin_bzero): Remove. (builtin_memset): Remove. * benchtests/bench-rawmemchr.c (simple_rawmemchr): Remove. (generic_rawmemchr): Add new function.
Diffstat (limited to 'benchtests/bench-memmove.c')
-rw-r--r--benchtests/bench-memmove.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
index ad1f0bb767..a5d957791a 100644
--- a/benchtests/bench-memmove.c
+++ b/benchtests/bench-memmove.c
@@ -17,34 +17,16 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
-#ifdef TEST_BCOPY
-# define TEST_NAME "bcopy"
-#else
-# define TEST_NAME "memmove"
-#endif
+#define TEST_NAME "memmove"
#include "bench-string.h"
#include "json-lib.h"
char *simple_memmove (char *, const char *, size_t);
-#ifdef TEST_BCOPY
-typedef void (*proto_t) (const char *, char *, size_t);
-void simple_bcopy (const char *, char *, size_t);
-
-IMPL (simple_bcopy, 0)
-IMPL (bcopy, 1)
-
-void
-simple_bcopy (const char *src, char *dst, size_t n)
-{
- simple_memmove (dst, src, n);
-}
-#else
typedef char *(*proto_t) (char *, const char *, size_t);
-IMPL (simple_memmove, 0)
IMPL (memmove, 1)
-#endif
+IMPL (simple_memmove, 0)
char *
inhibit_loop_to_libcall
@@ -74,11 +56,7 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
TIMING_NOW (start);
for (i = 0; i < iters; ++i)
{
-#ifdef TEST_BCOPY
- CALL (impl, src, dst, len);
-#else
CALL (impl, dst, src, len);
-#endif
}
TIMING_NOW (stop);