This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH] powerpc: add libmvec implementations of log and logf
- From: Shawn Landden <shawn at git dot icu>
- To: libc-alpha at sourceware dot org
- Date: Sun, 5 May 2019 15:53:10 -0500
- Subject: Re: [RFC][PATCH] powerpc: add libmvec implementations of log and logf
- References: <20190505203438.28140-1-shawn@git.icu>
On Sun, May 5, 2019 at 3:34 PM Shawn Landden <shawn@git.icu> wrote:
>
> The ABI spec[1] Is x86 specific. I removed the arch field,
> because this can be handled using IFUNC (the vector width is
> part of the name).
>
> GCC will have to be taught about these.
I forgot to mentions some things.
The log function has better accuracy than scalar log due to the use of
fused-multiply-add. Sadly this means I don't have a good way to test
this function's accuracy. Perhaps it is better to produce the same
results as those functions, in which case I will remove the FMA and
add the additional table. Alternatively we could use FMA for the
scalar log as well.
[BZ #24208]
>
> When fed numbers in the range of 0 to 2^32 (as doubles) the vector log
> is about 75% faster than scalar log.
>
> When fed numbers in the range of 0 to 2^16 (as floats) the vector logf
> is about 30% faster than scalar logf. This should probably be faster,
> and did not spend much time in perf looking into this.[2]
>
> logf requires Power 7
> log requires Power 8
> (according to gcc allowing them to be compiled with -mcpu=powerx)
>