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] Use integer constants in mpa.c


On 22 March 2013 19:54, Richard Henderson <rth@twiddle.net> wrote:
> On 2013-03-22 03:02, Siddhesh Poyarekar wrote:
>>
>> -  if (X[0] == ZERO)
>> +  if (__glibc_unlikely (X[0] == 0))
>
>
> I'm not keen on all the branch markup.  I can't believe it's all necessary.
> At minimum please split that out to a separate patch, but I'd much rather do
> without.

I've only marked branches where the compiler gets it wrong and that
results in a performance penalty.  I'll split it out into a separate
patch since the rest of the bits are fairly straightforward.

>>         *y = ZERO;
>
> ...
>
>> -         z[2] = ZERO;
>> -         z[3] = ZERO;
>> +         z[2] = 0;
>> +         z[3] = 0;
>
>
> Is there a good reason to leave some ZERO uses and not others?  I can't
> imagine the literal 0 not be just as good everywhere, even in a
> floating-point context; the compiler is quite good at converting constants
> at compile time...
>
> Perhaps we should just eliminate these macros entirely?

OK, I'll just remove all of those macros one by one, starting with
mpa.c.  I'll do the branch prediction bits later as that may need more
justification.

Thanks,
Siddhesh
-- 
http://siddhesh.in


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