This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/4] Use __copysign in sincos wherever possible
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>, libc-alpha at sourceware dot org
- Date: Tue, 27 Sep 2016 15:10:15 -0400
- Subject: Re: [PATCH 0/4] Use __copysign in sincos wherever possible
- Authentication-results: sourceware.org; auth=none
- References: <1474998553-2366-1-git-send-email-siddhesh@sourceware.org>
On 09/27/2016 01:49 PM, Siddhesh Poyarekar wrote:
> Hi,
>
> The following set of patches is another set of cleanups to sin/cos functions
> and their helpers. The key change is to replace ternary conditions in the code
> with copysign wherever applicable. This results in improving performance of
> the SPEC2006 test tonto by 4.5%.
>
> Siddhesh Poyarekar (4):
> consolidate sign checks for slow2
> Check n instead of k1 to decide on sign of sin/cos result
> Use copysign instead of ternary conditions for positive constants
> Use copysign instead of ternary for some sin/cos input ranges
>
> sysdeps/ieee754/dbl-64/s_sin.c | 80 ++++++++++++++++++++++--------------------
> 1 file changed, 41 insertions(+), 39 deletions(-)
>
That's quiet a good improvement.
Is that a mean percentage improvement over some number of consecutive runs?
I'm just wondering if the 4.5% is noise, or a real performance gain.
--
Cheers,
Carlos.