This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: modf optimization
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 22 Apr 2013 15:55:02 -0500
- Subject: Re: [PATCH] PowerPC: modf optimization
- References: <51508CA8 dot 5090203 at linux dot vnet dot ibm dot com> <515091DD dot 5030504 at suse dot com> <51509695 dot 7020508 at linux dot vnet dot ibm dot com> <CAAHN_R3H+6gxbCRWqGapdz5JGJhfVLePqfo08P4xGkaDMXRRUg at mail dot gmail dot com> <5152F9C4 dot 1000705 at linux dot vnet dot ibm dot com> <5152FE2E dot 9060309 at suse dot com> <5158B110 dot 2070206 at linux dot vnet dot ibm dot com> <51630C7C dot 2040506 at linux dot vnet dot ibm dot com> <516D56D7 dot 7050902 at linux dot vnet dot ibm dot com>
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