[PATCH] PowerPC: modf optimization
Ryan S. Arnold
ryan.arnold@gmail.com
Tue Apr 23 07:25:00 GMT 2013
On Tue, Apr 16, 2013 at 8:49 AM, Adhemerval Zanella
<azanella@linux.vnet.ibm.com> wrote:
> Ping.
>
> On 08-04-2013 15:29, Adhemerval Zanella wrote:
>> Ping.
>>
>> On 03/31/2013 06:56 PM, Adhemerval Zanella wrote:
>>> On 03/27/2013 11:11 AM, Andreas Jaeger wrote:
>>>> I'm fine with the benchtests addition (see one comment below).
>>>>
>>>> I'm not sure about the __ceil, __floor issue and would like feedback from others on how to handle this,
>>> I have added the copyright header and I changed to patch to use the new modf
>>> implementation for POWER5 or higher only, making the s_floor and s_ceil addition
>>> not required anymore.
>>>
>>> I also increased the iterations to 5e8 and I got the following results in a POWER7
>>> machine with 64 bits:
>>>
>>> MASTER: modf: ITERS:5e+08: TOTAL:5.96664s, MAX:42.302ns, MIN:9.104ns, 8.37993e+07 iter/s
>>> PATCH: modf: ITERS:5e+08: TOTAL:3.00147s, MAX:40.334ns, MIN:5.63ns, 1.66585e+08 iter/s
>>>
>>> And clock_gettime is an vDSO for PowerPC, however afaik CLOCK_PROCESS_CPUTIME_ID
>>> fall-back to a syscall even for x86_64. Maybe we should increase the default
>>> iterations for all benchtests.
>>>
>>> Any tips, comments, advices?
>>>
>>> ---
>>>
>>> 2013-03-31 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
>>>
>>> * sysdeps/powerpc/fpu/s_modf.c: New file: modf optimization for POWER.
>>> * sysdeps/powerpc/fpu/s_modff.c: New file: modff optimization for POWER.
>>> * sysdeps/powerpc/powerpc64/power5/Implies: Add powerpc/power5 and
>>> powerpc/power5/fpu folders.
>>> * sysdeps/powerpc/powerpc32/power5/Implies: Likewise.
>>> * benchtests/Makefile: Add modf testcase.
>>> * benchtests/bench-modf.c: New file: Benchmark test for modf.
I'm fine with the mod_f changes. I couldn't tell from this discussion
whether the benchmark changes were redundant or not. I trust you'll
test this against trunk before it's checked in.
Ryan
More information about the Libc-alpha
mailing list