[PATCH] math: remove exp10 wrappers

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Jan 18 14:26:09 GMT 2024


Hi Adhemerval,

>> if that's the case then indeed using float/double directly
>> may be better than float_t/double_t (but keep in mind if
>> somebody builds the code outside the glibc tree to do
>> tests or other analysis the behaviour will be fragile on
>> targets like i386 and m68k. same if we ever want to change
>> the glibc build flags to iso c mode on those targets.)
>
> My plan is to send some fixes to allow remove some remaining assembly
> implementations from i386.  I don't think it would worth to change
> the current code besides the numerical stability I have found.

I agree doing the fixes first (eg. by adding a cast to double) is best.
Improving the macro to do this automatically may be an idea.

In my measurements on exp10, using double instead of double_t was
22% faster (due to fewer store-load sequences). With -fpmath=sse it
is 36% faster (LLVM does that by default). So given GCC prefers double
and LLVM uses faster SSE already, there doesn't appear to be any benefit
from supporting double_t.

Cheers,
Wilco


More information about the Libc-alpha mailing list