[PATCH v2 4/6] x86-64: Add vector log/logf to libmvec microbenchmark
Sunil Pandey
skpgkp2@gmail.com
Sat Nov 13 06:14:03 GMT 2021
On Fri, Nov 12, 2021 at 5:44 PM Joseph Myers <joseph@codesourcery.com>
wrote:
> On Fri, 12 Nov 2021, Sunil Pandey via Libc-alpha wrote:
>
> > On Fri, Nov 12, 2021 at 3:18 PM Joseph Myers <joseph@codesourcery.com>
> > wrote:
> >
> > > On Fri, 12 Nov 2021, Sunil K Pandey via Libc-alpha wrote:
> > >
> > > > +# Random inputs in [a=1.10,b=100.00]
> > >
> > > It seems odd not to have any inputs in (0, 1.10), or larger than 100
> (in
> > > the absence of actual evidence that such numbers are rare as arguments
> to
> > > log in practice). All positive numbers are reasonable arguments to
> log.
> > >
> > On some cpu there may be a slow path around 0 and 1, hence range
> > selected from 1.10 to avoid slow path which may distort microbenchmark
> > number on some cpu. There is no such issue for numbers larger than 100,
> > we have to pick some number and choose 100 for microbenchmark.
>
> I think the point of such benchmarks should be to provide typical inputs
> to the function such as might be found in ordinary programs using the
> function, and provide a sensible way in which completely different
> implementations of the same function can be compared. It should not be
> based on the details of where slow paths in a particular implementation
> are; that artificially advantages the current implementation against any
> alternative implementation that might be proposed.
>
Hi Joseph,
Can you please provide some suggestions on input range, if it looks OK or
it should be changed to some specific value to make it fair for different
implementations.
cos/cosf: Random inputs in [a=-100.00,b=100.00]
exp/expf: Random inputs in [a=-10.00,b=50.00]
log/logf: Random inputs in [a=1.10,b=100.00]
pow/powf: Random inputs in [a=0.01,b=100.00], [c=0.01,d=10.00]
sin/sinf: Random inputs in [a=-100.00,b=100.00]
Thanks,
Sunil
> --
> Joseph S. Myers
> joseph@codesourcery.com
>
More information about the Libc-alpha
mailing list