This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/7] sin/cos slow paths: remove large range reduction
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Thu, 22 Mar 2018 22:14:56 +0000
- Subject: Re: [PATCH 2/7] sin/cos slow paths: remove large range reduction
- References: <DB6PR0801MB2053FBB12209FA83A345256F83AA0@DB6PR0801MB2053.eurprd08.prod.outlook.com>
On Wed, 21 Mar 2018, Wilco Dijkstra wrote:
> This patch removes the large range reduction code and defers to the huge range
> reduction code. The first level range reducer supports inputs up to 2^27,
> which is way too large given that inputs for sin/cos are typically small
> (< 10), and optimizing for a smaller range would give a significant speedup.
>
> Input values above 2^27 are practically never used, so there is no reason for
> supporting range reduction between 2^27 and 2^48. Removing it significantly
> simplifies code and enables further speedups. There is about a 2.3x slowdown
> in this range due to __branred being extremely slow (a better algorithm could
> easily more than double performance).
OK.
--
Joseph S. Myers
joseph@codesourcery.com