diff options
Diffstat (limited to 'benchtests/bench-strspn.c')
-rw-r--r-- | benchtests/bench-strspn.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/benchtests/bench-strspn.c b/benchtests/bench-strspn.c index 04507cdd61..ac874fe234 100644 --- a/benchtests/bench-strspn.c +++ b/benchtests/bench-strspn.c @@ -28,19 +28,15 @@ #ifndef WIDE # define SIMPLE_STRSPN simple_strspn -# define STUPID_STRSPN stupid_strspn # define SMALL_CHAR 127 #else # define SIMPLE_STRSPN simple_wcsspn -# define STUPID_STRSPN stupid_wcsspn # define SMALL_CHAR 1273 #endif /* WIDE */ typedef size_t (*proto_t) (const CHAR *, const CHAR *); size_t SIMPLE_STRSPN (const CHAR *, const CHAR *); -size_t STUPID_STRSPN (const CHAR *, const CHAR *); -IMPL (STUPID_STRSPN, 0) IMPL (SIMPLE_STRSPN, 0) IMPL (STRSPN, 1) @@ -61,23 +57,6 @@ SIMPLE_STRSPN (const CHAR *s, const CHAR *acc) return s - str - 1; } -size_t -STUPID_STRSPN (const CHAR *s, const CHAR *acc) -{ - size_t ns = STRLEN (s), nacc = STRLEN (acc); - size_t i, j; - - for (i = 0; i < ns; ++i) - { - for (j = 0; j < nacc; ++j) - if (s[i] == acc[j]) - break; - if (j == nacc) - return i; - } - return i; -} - static void do_one_test (impl_t *impl, const CHAR *s, const CHAR *acc, size_t exp_res) { |