This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Add math-inline benchmark
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>, 'Ondřej Bílka' <neleai at seznam dot cz>
- Cc: "'Siddhesh Poyarekar'" <siddhesh at redhat dot com>, "'GNU C Library'" <libc-alpha at sourceware dot org>
- Date: Tue, 21 Jul 2015 12:43:09 -0400
- Subject: Re: [PATCH v2] Add math-inline benchmark
- Authentication-results: sourceware.org; auth=none
- References: <002001d0bfb8$b36fa330$1a4ee990$ at com> <55A907F6 dot 8000504 at redhat dot com> <20150717143406 dot GG19592 at spoyarek dot pnq dot redhat dot com> <002c01d0c30a$8f23c600$ad6b5200$ at com> <55AD4AC6 dot 5070401 at redhat dot com> <20150721113502 dot GA3415 at domone> <003101d0c3d0$b9fb4350$2df1c9f0$ at com>
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.