diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2023-03-03 13:21:05 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2023-03-08 18:36:48 +0000 |
commit | 9ab7c42387409d5cf8facd0a56cfd98ce55b8cc3 (patch) | |
tree | 3a7732f5094e4159dd93c4bd0ac937b7be90cf68 /benchtests/bench-strcasecmp.c | |
parent | 183b425a05f421db0f21a9a81553816525fe93b9 (diff) | |
download | glibc-9ab7c42387409d5cf8facd0a56cfd98ce55b8cc3.tar.gz glibc-9ab7c42387409d5cf8facd0a56cfd98ce55b8cc3.tar.xz glibc-9ab7c42387409d5cf8facd0a56cfd98ce55b8cc3.zip |
Benchtests: Remove simple_str(n)casecmp
Remove the slow byte oriented loops. Adjust iteration count to reduce benchmark time. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'benchtests/bench-strcasecmp.c')
-rw-r--r-- | benchtests/bench-strcasecmp.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/benchtests/bench-strcasecmp.c b/benchtests/bench-strcasecmp.c index fcfffdea42..abc6a216e3 100644 --- a/benchtests/bench-strcasecmp.c +++ b/benchtests/bench-strcasecmp.c @@ -23,28 +23,14 @@ #include "json-lib.h" typedef int (*proto_t) (const char *, const char *); -static int simple_strcasecmp (const char *, const char *); -IMPL (simple_strcasecmp, 0) IMPL (strcasecmp, 1) -static int -simple_strcasecmp (const char *s1, const char *s2) -{ - int ret; - - while ((ret = ((unsigned char) tolower (*s1) - - (unsigned char) tolower (*s2))) == 0 - && *s1++) - ++s2; - return ret; -} - static void do_one_test (json_ctx_t *json_ctx, impl_t *impl, const char *s1, const char *s2, int exp_result) { - size_t i, iters = INNER_LOOP_ITERS; + size_t i, iters = INNER_LOOP_ITERS8; timing_t start, stop, cur; int result = CALL (impl, s1, s2); if ((exp_result == 0 && result != 0) |