* [PATCH v1] Benchtests: Add length zero benchmark for memset in bench-memset.c
@ 2022-02-06 5:51 Noah Goldstein
2022-02-06 16:22 ` H.J. Lu
0 siblings, 1 reply; 2+ messages in thread
From: Noah Goldstein @ 2022-02-06 5:51 UTC (permalink / raw)
To: libc-alpha
Zero is a relevant size for some workloads (roughly 5% of uses for
GCC) so we should be testing it's performance as well.
---
benchtests/bench-memset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
index beba3fbe46..6f5b3d04a6 100644
--- a/benchtests/bench-memset.c
+++ b/benchtests/bench-memset.c
@@ -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);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] Benchtests: Add length zero benchmark for memset in bench-memset.c
2022-02-06 5:51 [PATCH v1] Benchtests: Add length zero benchmark for memset in bench-memset.c Noah Goldstein
@ 2022-02-06 16:22 ` H.J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2022-02-06 16:22 UTC (permalink / raw)
To: Noah Goldstein; +Cc: GNU C Library, Carlos O'Donell
On Sat, Feb 5, 2022 at 9:51 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> Zero is a relevant size for some workloads (roughly 5% of uses for
> GCC) so we should be testing it's performance as well.
> ---
> benchtests/bench-memset.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> index beba3fbe46..6f5b3d04a6 100644
> --- a/benchtests/bench-memset.c
> +++ b/benchtests/bench-memset.c
> @@ -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);
> --
> 2.25.1
>
LGTM.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-06 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-06 5:51 [PATCH v1] Benchtests: Add length zero benchmark for memset in bench-memset.c Noah Goldstein
2022-02-06 16:22 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).