This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC: modf optimization


On 03/25/2013 03:05 PM, Andreas Jaeger wrote:
> On 03/25/2013 06:43 PM, Adhemerval Zanella wrote:
>> This patch implements modf/modff optimization for POWER by focus
>> on FP operations instead of relying in integer ones.
>>
>> For POWER7 it shows a leverage of about 50% for modf ppc32, 40% for
>> modff ppc32, 65% for modf ppc64, and 60% for modff ppc64.
>
> How are you measuring the speed up? Is it possible to add these tests to the benchmark testsuite that was just started?
I measuring with a simple benchmark that calls the function multiple times and
calculate the average time on different kind of inputs. I'll check the benchmark
testsuite.

>
>> +# modf needs floof and ceil for powerpc64/POWER4
>> +sysdep_routines += s_floor s_ceil s_floorf s_ceilf
>
> So, you're moving s_floor and s_ceil into libc.so? That looks wrong to me. Are you sure that those are not exported?
>
> Andreas
I was reluctant also on adding the symbols since the issue is only triggered when
building for older platforms (pre-ISA 2.05 that does not support frim and frip
instructions). A better approach could be make the optimization build only
for POWER5+ arch where __floor and __ceil are inlined to intrinsics. What do
you think?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]