diff mbox series

[v1,1/3] benchtests: Add medium cases and increase iters in bench-memset.c

Message ID 20210926205306.900081-1-goldstein.w.n@gmail.com
State Committed
Commit 5d26d12f4ab59c67399c4d5ddcad91704fb737f9
Headers show
Series [v1,1/3] benchtests: Add medium cases and increase iters in bench-memset.c | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Noah Goldstein Sept. 26, 2021, 8:53 p.m. UTC
No bug.

This commit adds new medium size cases for lengths in [512, 1024). As
well it increase the iters to INNER_LOOP_ITERS_LARGE for more reliable
results.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
---
 benchtests/bench-memset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Noah Goldstein Oct. 5, 2021, 4:33 p.m. UTC | #1
On Sun, Sep 26, 2021 at 3:53 PM Noah Goldstein <goldstein.w.n@gmail.com>
wrote:

> No bug.
>
> This commit adds new medium size cases for lengths in [512, 1024). As
> well it increase the iters to INNER_LOOP_ITERS_LARGE for more reliable
> results.
>
> Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
> ---
>  benchtests/bench-memset.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> index d6619b4836..4284cb1724 100644
> --- a/benchtests/bench-memset.c
> +++ b/benchtests/bench-memset.c
> @@ -43,7 +43,7 @@ static void
>  do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
>              int c __attribute ((unused)), size_t n)
>  {
> -  size_t i, iters = INNER_LOOP_ITERS;
> +  size_t i, iters = INNER_LOOP_ITERS_LARGE;
>    timing_t start, stop, cur;
>
>    TIMING_NOW (start);
> @@ -118,7 +118,7 @@ test_main (void)
>           if (i & (i - 1))
>             do_test (&json_ctx, 0, c, i);
>         }
> -      for (i = 32; i < 512; i+=32)
> +      for (i = 32; i < 1024; i+=32)
>         {
>           do_test (&json_ctx, 0, c, i);
>           do_test (&json_ctx, i, c, i);
> --
> 2.25.1
>
>
ping (for the patchset).
H.J. Lu Oct. 8, 2021, 7:39 p.m. UTC | #2
On Sun, Sep 26, 2021 at 1:53 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> No bug.
>
> This commit adds new medium size cases for lengths in [512, 1024). As
> well it increase the iters to INNER_LOOP_ITERS_LARGE for more reliable
> results.
>
> Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
> ---
>  benchtests/bench-memset.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> index d6619b4836..4284cb1724 100644
> --- a/benchtests/bench-memset.c
> +++ b/benchtests/bench-memset.c
> @@ -43,7 +43,7 @@ static void
>  do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
>              int c __attribute ((unused)), size_t n)
>  {
> -  size_t i, iters = INNER_LOOP_ITERS;
> +  size_t i, iters = INNER_LOOP_ITERS_LARGE;
>    timing_t start, stop, cur;
>
>    TIMING_NOW (start);
> @@ -118,7 +118,7 @@ test_main (void)
>           if (i & (i - 1))
>             do_test (&json_ctx, 0, c, i);
>         }
> -      for (i = 32; i < 512; i+=32)
> +      for (i = 32; i < 1024; i+=32)
>         {
>           do_test (&json_ctx, 0, c, i);
>           do_test (&json_ctx, i, c, i);
> --
> 2.25.1
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
Noah Goldstein Oct. 8, 2021, 9:04 p.m. UTC | #3
On Fri, Oct 8, 2021 at 2:39 PM H.J. Lu <hjl.tools@gmail.com> wrote:

> On Sun, Sep 26, 2021 at 1:53 PM Noah Goldstein <goldstein.w.n@gmail.com>
> wrote:
> >
> > No bug.
> >
> > This commit adds new medium size cases for lengths in [512, 1024). As
> > well it increase the iters to INNER_LOOP_ITERS_LARGE for more reliable
> > results.
> >
> > Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
> > ---
> >  benchtests/bench-memset.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> > index d6619b4836..4284cb1724 100644
> > --- a/benchtests/bench-memset.c
> > +++ b/benchtests/bench-memset.c
> > @@ -43,7 +43,7 @@ static void
> >  do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
> >              int c __attribute ((unused)), size_t n)
> >  {
> > -  size_t i, iters = INNER_LOOP_ITERS;
> > +  size_t i, iters = INNER_LOOP_ITERS_LARGE;
> >    timing_t start, stop, cur;
> >
> >    TIMING_NOW (start);
> > @@ -118,7 +118,7 @@ test_main (void)
> >           if (i & (i - 1))
> >             do_test (&json_ctx, 0, c, i);
> >         }
> > -      for (i = 32; i < 512; i+=32)
> > +      for (i = 32; i < 1024; i+=32)
> >         {
> >           do_test (&json_ctx, 0, c, i);
> >           do_test (&json_ctx, i, c, i);
> > --
> > 2.25.1
> >
>
> LGTM.
>
> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
>
> Thanks.
>
> --
> H.J.
>

Thanks. Pushed.
diff mbox series

Patch

diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
index d6619b4836..4284cb1724 100644
--- a/benchtests/bench-memset.c
+++ b/benchtests/bench-memset.c
@@ -43,7 +43,7 @@  static void
 do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
 	     int c __attribute ((unused)), size_t n)
 {
-  size_t i, iters = INNER_LOOP_ITERS;
+  size_t i, iters = INNER_LOOP_ITERS_LARGE;
   timing_t start, stop, cur;
 
   TIMING_NOW (start);
@@ -118,7 +118,7 @@  test_main (void)
 	  if (i & (i - 1))
 	    do_test (&json_ctx, 0, c, i);
 	}
-      for (i = 32; i < 512; i+=32)
+      for (i = 32; i < 1024; i+=32)
 	{
 	  do_test (&json_ctx, 0, c, i);
 	  do_test (&json_ctx, i, c, i);