[EXT] Re: [PATCH 0/7] Simplify and optimize modf/modff
Peter Bergner
bergner@tenstorrent.com
Wed Jun 11 03:04:33 GMT 2025
On 6/10/25 8:07 AM, Adhemerval Zanella Netto wrote:
> Ping.
>
> On 28/05/25 14:59, Adhemerval Zanella wrote:
>> The patchset uses the powerpc implementation idea to make it generic and
>> leverage rounding instruction on newer chips. The PowerPC implementation
>> is also suboptimal, where a trunc operation can replace the floor/ceil
>> operation.
>>
>> The optimized implementation is gated through USE_TRUNCF_BUILTIN, since
>> libc exports modf/modff, and making it generic would add a lot of
>> complexity (since trunc will need to be pulled) and not all ABIs have
>> rounding instruction in the base ABI.
>>
>> Adhemerval Zanella (7):
>> benchtests: Add modff benchtest
>> benchtests: Improve modf benchtest
>> math: Simplify and optimize modff implementation
>> math: Simplify and optimize modf implementation
>> powerpc: Remove modff optimization
>> powerpc: Remove modf optimization
>> x86_64: Optimize modf/modff for x86_64-v2
Given we resolved the performance data initially shown was just
confusion on my part, the powerpc changes are ok.
Peter
More information about the Libc-alpha
mailing list