[PATCH 2/7] sin/cos slow paths: remove large range reduction
Joseph Myers
joseph@codesourcery.com
Thu Mar 22 22:15:00 GMT 2018
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
More information about the Libc-alpha
mailing list