This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH][BZ #14412] Define __sincos_finite as a fast version of sincos
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org, libc-ports at sourceware dot org
- Date: Tue, 30 Apr 2013 10:58:00 +0200
- Subject: Re: [PATCH][BZ #14412] Define __sincos_finite as a fast version of sincos
- References: <20130429102739 dot GE1330 at spoyarek dot pnq dot redhat dot com>
On Mon, Apr 29, 2013 at 03:57:40PM +0530, Siddhesh Poyarekar wrote:
> Hi,
>
> The assembly implementation of sincos on x86_64 was removed in favour
> of the default implementation since the former was inaccurate for some
> inputs. This led to BZ #14412 being reported for a performance
> regression in sincos.
>
> This patch brings back the assembly implementation of sincos (with
> some changes) to give a fast alternative to the default sincos
> implementation. This is defined as __sincos_finite and is used if the
> implementing program is compiled with the -ffinite-math-only gcc flag.
>
Could you add test that input is less than 1000 and 1/1000 away from
multiple of pi? If so call precise version.
Assembly should be precise on these inputs so you do not have to add
-ffast math hack.
> I have tested that this works correctly for x86_64 and i686, where the
> former uses the assembly implementation of __sincos_finite and the
> latter uses the weak alias to sincos. I have also verified that there
> are no regressions in the testsuite on x86_64.
>
> The patch also has changes to m68k and ia64 (in addition to the
> abilist update) since they have custom implementations of sincos. I
> have not tested those, so I would request the maintainers to let me
> know if the changes break anything on their architectures.
>
> Siddhesh
>