Benchtests: Add length zero benchmark for memset in bench-memset.c
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 6 Feb 2022 05:51:07 +0000 (23:51 -0600)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Mon, 7 Feb 2022 04:01:39 +0000 (22:01 -0600)
Zero is a relevant size for some workloads (roughly 5% of uses for
GCC) so we should be testing it's performance as well.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
benchtests/bench-memset.c

index e1e2d5f..6c95a1e 100644 (file)
@@ -110,7 +110,7 @@ test_main (void)
     {
       for (i = 0; i < 18; ++i)
        do_test (&json_ctx, 0, c, 1 << i);
-      for (i = 1; i < 64; ++i)
+      for (i = 0; i < 64; ++i)
        {
          do_test (&json_ctx, i, c, i);
          do_test (&json_ctx, 4096 - i, c, i);