diff mbox

Benchtests: Add tests to cover longer string for strrchr

Message ID 1487649977-30920-1-git-send-email-raji@linux.vnet.ibm.com
State New
Headers show

Commit Message

Rajalakshmi Srinivasaraghavan Feb. 21, 2017, 4:06 a.m. UTC
While working on strrchr optimization for power8, found that the
existing benchtests is not enough to find the improvements
for longer strings.  Hence increasing the length to 512 to
measure the performance for a wide range.

2017-02-21  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	* benchtests/bench-strrchr.c (test_main): Increase the iteration
	to cover longer string.
---
 benchtests/bench-strrchr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Siddhesh Poyarekar Feb. 21, 2017, 9:43 a.m. UTC | #1
On Tuesday 21 February 2017 09:36 AM, Rajalakshmi Srinivasaraghavan wrote:
> While working on strrchr optimization for power8, found that the
> existing benchtests is not enough to find the improvements
> for longer strings.  Hence increasing the length to 512 to
> measure the performance for a wide range.
> 
> 2017-02-21  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
> 
> 	* benchtests/bench-strrchr.c (test_main): Increase the iteration
> 	to cover longer string.

This is fine.

Siddhesh
diff mbox

Patch

diff --git a/benchtests/bench-strrchr.c b/benchtests/bench-strrchr.c
index 8af363a..3ea8200 100644
--- a/benchtests/bench-strrchr.c
+++ b/benchtests/bench-strrchr.c
@@ -154,7 +154,7 @@  test_main (void)
       do_test (i, 64, 256, 23, BIG_CHAR);
     }
 
-  for (i = 0; i < 32; ++i)
+  for (i = 0; i < 512; ++i)
     {
       do_test (0, i, i + 1, 23, SMALL_CHAR);
       do_test (0, i, i + 1, 23, BIG_CHAR);
@@ -172,7 +172,7 @@  test_main (void)
       do_test (i, 64, 256, 0, BIG_CHAR);
     }
 
-  for (i = 0; i < 32; ++i)
+  for (i = 0; i < 512; ++i)
     {
       do_test (0, i, i + 1, 0, SMALL_CHAR);
       do_test (0, i, i + 1, 0, BIG_CHAR);