[PATCH] benchtests: Increase iterations for strpbrk/strspn

Wilco Dijkstra <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <PAWPR08MB8982CEFA36D1644D4349095583A72@PAWPR08MB8982.eurprd08.prod.outlook.com>
Increase iterations for strpbrk/strspn so they run for at least 0.5s.
Reduce iterations for the much slower wcs* variants since they take over 10s.

OK for commit?

---

diff --git a/benchtests/bench-strpbrk.c b/benchtests/bench-strpbrk.c
index 61607fde1559b24e19d0458891c3595b181986b4..139cb7d689b0db5e7b1b327355452eaa67b9ae94 100644
--- a/benchtests/bench-strpbrk.c
+++ b/benchtests/bench-strpbrk.c
@@ -48,7 +48,7 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, const CHAR *s,
              const CHAR *rej, RES_TYPE exp_res)
 {
   RES_TYPE res = CALL (impl, s, rej);
-  size_t i, iters = INNER_LOOP_ITERS8 / CHARBYTES;
+  size_t i, iters = CHARBYTES > 1 ? INNER_LOOP_ITERS : INNER_LOOP_ITERS_LARGE;
   timing_t start, stop, cur;
 
   if (res != exp_res)
diff --git a/benchtests/bench-strspn.c b/benchtests/bench-strspn.c
index e997d443fba18382c84d1bb612b3a60dacd68f46..560bb5d77b8e9a3091a64ba5a8fa9cdd589e901a 100644
--- a/benchtests/bench-strspn.c
+++ b/benchtests/bench-strspn.c
@@ -41,7 +41,8 @@ static void
 do_one_test (json_ctx_t *json_ctx, impl_t *impl, const CHAR *s,
              const CHAR *acc, size_t exp_res)
 {
-  size_t res = CALL (impl, s, acc), i, iters = INNER_LOOP_ITERS8 / CHARBYTES;
+  size_t res = CALL (impl, s, acc), i;
+  size_t iters = CHARBYTES > 1 ? INNER_LOOP_ITERS : INNER_LOOP_ITERS_LARGE;
   timing_t start, stop, cur;
 
   if (res != exp_res)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.