Message ID | 20210503084435.160548-1-goldstein.w.n@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v1,1/3] Bench: Expand bench-memchr.c | expand |
On Mon, May 3, 2021 at 1:45 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote: > > No bug. This commit adds some additional cases for bench-memchr.c > including testing medium sizes and testing short length with both an > inbound match and out of bound match. > > Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> > --- > benchtests/bench-memchr.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c > index f5ced9d80d..5573f93312 100644 > --- a/benchtests/bench-memchr.c > +++ b/benchtests/bench-memchr.c > @@ -135,12 +135,25 @@ test_main (void) > do_test (i, i, 256, 0); > #endif > } > + for (i = 1; i < 8; ++i) > + { > + do_test (i, i << 5, 192, 23); > + do_test (i, i << 5, 192, 0); > + do_test (i, i << 5, 256, 23); > + do_test (i, i << 5, 256, 0); > + do_test (i, i << 5, 512, 23); > + do_test (i, i << 5, 512, 0); > + } > for (i = 1; i < 32; ++i) > { > do_test (0, i, i + 1, 23); > do_test (0, i, i + 1, 0); > do_test (i, i, i + 1, 23); > do_test (i, i, i + 1, 0); > + do_test (0, i, i - 1, 23); > + do_test (0, i, i - 1, 0); > + do_test (i, i, i - 1, 23); > + do_test (i, i, i - 1, 0); > #ifdef USE_AS_MEMRCHR > /* Also test the position close to the beginning for memrchr. */ > do_test (0, 1, i + 1, 23); > -- > 2.29.2 > LGTM. I will check it in for you. BTW, can you apply an account on sourceware.org: https://sourceware.org/ so that you can push your commits directly? You can put me down as your sponsor. Thanks.
On Mon, May 3, 2021 at 1:18 PM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Mon, May 3, 2021 at 1:45 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote: > > > > No bug. This commit adds some additional cases for bench-memchr.c > > including testing medium sizes and testing short length with both an > > inbound match and out of bound match. > > > > Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> > > --- > > benchtests/bench-memchr.c | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c > > index f5ced9d80d..5573f93312 100644 > > --- a/benchtests/bench-memchr.c > > +++ b/benchtests/bench-memchr.c > > @@ -135,12 +135,25 @@ test_main (void) > > do_test (i, i, 256, 0); > > #endif > > } > > + for (i = 1; i < 8; ++i) > > + { > > + do_test (i, i << 5, 192, 23); > > + do_test (i, i << 5, 192, 0); > > + do_test (i, i << 5, 256, 23); > > + do_test (i, i << 5, 256, 0); > > + do_test (i, i << 5, 512, 23); > > + do_test (i, i << 5, 512, 0); > > + } > > for (i = 1; i < 32; ++i) > > { > > do_test (0, i, i + 1, 23); > > do_test (0, i, i + 1, 0); > > do_test (i, i, i + 1, 23); > > do_test (i, i, i + 1, 0); > > + do_test (0, i, i - 1, 23); > > + do_test (0, i, i - 1, 0); > > + do_test (i, i, i - 1, 23); > > + do_test (i, i, i - 1, 0); > > #ifdef USE_AS_MEMRCHR > > /* Also test the position close to the beginning for memrchr. */ > > do_test (0, 1, i + 1, 23); > > -- > > 2.29.2 > > > > LGTM. I will check it in for you. Thanks! > > BTW, can you apply an account on sourceware.org: > > https://sourceware.org/ > > so that you can push your commits directly? You can put me down > as your sponsor. Done. Are there any wikis / manuals on how to properly use write access? All I'm finding are resources on how to obtain it. > > Thanks. > > -- > H.J.
On Mon, May 3, 2021 at 12:52 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote: > > On Mon, May 3, 2021 at 1:18 PM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > On Mon, May 3, 2021 at 1:45 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote: > > > > > > No bug. This commit adds some additional cases for bench-memchr.c > > > including testing medium sizes and testing short length with both an > > > inbound match and out of bound match. > > > > > > Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> > > > --- > > > benchtests/bench-memchr.c | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > > > > > > diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c > > > index f5ced9d80d..5573f93312 100644 > > > --- a/benchtests/bench-memchr.c > > > +++ b/benchtests/bench-memchr.c > > > @@ -135,12 +135,25 @@ test_main (void) > > > do_test (i, i, 256, 0); > > > #endif > > > } > > > + for (i = 1; i < 8; ++i) > > > + { > > > + do_test (i, i << 5, 192, 23); > > > + do_test (i, i << 5, 192, 0); > > > + do_test (i, i << 5, 256, 23); > > > + do_test (i, i << 5, 256, 0); > > > + do_test (i, i << 5, 512, 23); > > > + do_test (i, i << 5, 512, 0); > > > + } > > > for (i = 1; i < 32; ++i) > > > { > > > do_test (0, i, i + 1, 23); > > > do_test (0, i, i + 1, 0); > > > do_test (i, i, i + 1, 23); > > > do_test (i, i, i + 1, 0); > > > + do_test (0, i, i - 1, 23); > > > + do_test (0, i, i - 1, 0); > > > + do_test (i, i, i - 1, 23); > > > + do_test (i, i, i - 1, 0); > > > #ifdef USE_AS_MEMRCHR > > > /* Also test the position close to the beginning for memrchr. */ > > > do_test (0, 1, i + 1, 23); > > > -- > > > 2.29.2 > > > > > > > LGTM. I will check it in for you. > > Thanks! > > > > > BTW, can you apply an account on sourceware.org: > > > > https://sourceware.org/ > > > > so that you can push your commits directly? You can put me down > > as your sponsor. > > Done. Are there any wikis / manuals on how to properly use write access? https://sourceware.org/glibc/wiki/HomePage has a lot of good information. > All I'm finding are resources on how to obtain it. > > > > > Thanks. > > > > -- > > H.J.
diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c index f5ced9d80d..5573f93312 100644 --- a/benchtests/bench-memchr.c +++ b/benchtests/bench-memchr.c @@ -135,12 +135,25 @@ test_main (void) do_test (i, i, 256, 0); #endif } + for (i = 1; i < 8; ++i) + { + do_test (i, i << 5, 192, 23); + do_test (i, i << 5, 192, 0); + do_test (i, i << 5, 256, 23); + do_test (i, i << 5, 256, 0); + do_test (i, i << 5, 512, 23); + do_test (i, i << 5, 512, 0); + } for (i = 1; i < 32; ++i) { do_test (0, i, i + 1, 23); do_test (0, i, i + 1, 0); do_test (i, i, i + 1, 23); do_test (i, i, i + 1, 0); + do_test (0, i, i - 1, 23); + do_test (0, i, i - 1, 0); + do_test (i, i, i - 1, 23); + do_test (i, i, i - 1, 0); #ifdef USE_AS_MEMRCHR /* Also test the position close to the beginning for memrchr. */ do_test (0, 1, i + 1, 23);
No bug. This commit adds some additional cases for bench-memchr.c including testing medium sizes and testing short length with both an inbound match and out of bound match. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> --- benchtests/bench-memchr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)