[PATCH v2] Add math-inline benchmark

Carlos O'Donell carlos@redhat.com
Tue Jul 21 16:43:00 GMT 2015


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.



More information about the Libc-alpha mailing list