]> git.ipfire.org Git - thirdparty/glibc.git/commit
[PATCH 7/7] sin/cos slow paths: refactor sincos implementation
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:49:33 +0000 (16:49 +0100)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:26:06 +0000 (17:26 -0700)
commit2d20ffe431ddd299b50ba250fce43285b9617d31
treece15c397bed62e68bc9dfe5a285dd45fcc1ed863
parentc8aaaf67f69d6a9dc92e8fe18dc5c12362be76ea
[PATCH 7/7] sin/cos slow paths: refactor sincos implementation

Refactor the sincos implementation - rather than rely on odd partial inlining
of preprocessed portions from sin and cos, explicitly write out the cases.
This makes sincos much easier to maintain and provides an additional 16-20%
speedup between 0 and 2^27.  The overall speedup of sincos is 48% over this range.
Between 0 and PI it is 66% faster.

* sysdeps/ieee754/dbl-64/s_sin.c (__sin): Cleanup ifdefs.
(__cos): Likewise.
* sysdeps/ieee754/dbl-64/s_sin.c (__sincos): Refactor using the same
logic as sin and cos.
sysdeps/ieee754/dbl-64/s_sin.c
sysdeps/ieee754/dbl-64/s_sincos.c