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 v2] Add math-inline benchmark


On 07/21/2015 12:17 PM, Wilco Dijkstra wrote:
>>>> +  return __builtin_isnan (d) || __builtin_isinf (d);
> 
> Fpclassify uses the builtin, but I think it's better to remove these
> tests as they don't add much value. It's pretty obvious it is better
> to use separate tests instead of fpclassify when you only need 2 of them.

Thanks Wilco, please post a follow up patch.

>> Also you don't test inlines in isnormal:
>>
>>>> +/* Explicit inline similar to existing math.h implementation.  */
>>>> +
>>>> +#define __isnormal_inl(X) (__fpclassify (X) == FP_NORMAL)
> 
> This is an inline and exactly what the current math.h does. The goal of my
> benchmark is comparing the existing implementation with the new inlines.

Agreed.

Cheers,
Carlos.


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