about summary refs log tree commit diff
path: root/benchtests/bench-strcspn.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2023-03-03 13:03:19 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2023-03-08 18:36:48 +0000
commit5de1508803bd1beeadd370ebac19e43b3232380b (patch)
tree763df389ac94b44743b13da43f3bc4d96a13bf2d /benchtests/bench-strcspn.c
parentb0e02d5b6d65cdfc972494484ef9a67b8e55e8f0 (diff)
downloadglibc-5de1508803bd1beeadd370ebac19e43b3232380b.tar.gz
glibc-5de1508803bd1beeadd370ebac19e43b3232380b.tar.xz
glibc-5de1508803bd1beeadd370ebac19e43b3232380b.zip
Benchtests: Remove simple_strcspn/strpbrk/strsep
Remove simple_strcspn/strpbrk/strsep which are significantly slower than the
generic implementations.  Also remove oldstrsep and oldstrtok since they are
practically identical to the generic implementation.  Adjust iteration count
to reduce benchmark time.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'benchtests/bench-strcspn.c')
-rw-r--r--benchtests/bench-strcspn.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/benchtests/bench-strcspn.c b/benchtests/bench-strcspn.c
index 2388f33d54..fa74d305ae 100644
--- a/benchtests/bench-strcspn.c
+++ b/benchtests/bench-strcspn.c
@@ -26,29 +26,8 @@
 #endif /* WIDE */
 #include "bench-string.h"
 
-#ifndef WIDE
-# define SIMPLE_STRCSPN simple_strcspn
-#else
-# define SIMPLE_STRCSPN simple_wcscspn
-#endif /* WIDE */
-
 typedef size_t (*proto_t) (const CHAR *, const CHAR *);
-size_t SIMPLE_STRCSPN (const CHAR *, const CHAR *);
 
-IMPL (SIMPLE_STRCSPN, 0)
 IMPL (STRCSPN, 1)
 
-size_t
-SIMPLE_STRCSPN (const CHAR *s, const CHAR *rej)
-{
-  const CHAR *r, *str = s;
-  CHAR c;
-
-  while ((c = *s++) != '\0')
-    for (r = rej; *r != '\0'; ++r)
-      if (*r == c)
-	return s - str - 1;
-  return s - str - 1;
-}
-
 #include "bench-strpbrk.c"