]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Inline __ieee754__rem_pio2f(). On amd64 (A64) and i386 (A64), this
authorBruce Evans <bde@FreeBSD.org>
Mon, 25 Feb 2008 22:19:17 +0000 (22:19 +0000)
committerBruce Evans <bde@FreeBSD.org>
Mon, 25 Feb 2008 22:19:17 +0000 (22:19 +0000)
commite822ea5b2a5c2f484f8b51ddf5c87bc7e3ae1557
tree2d96ab7d37d7cdf8c4b97d00f4ea3f3afadafe26
parentaf6e49e963e37904cc7410bb17373256d12fed10
Inline __ieee754__rem_pio2f().  On amd64 (A64) and i386 (A64), this
gives an average speedup of about 12 cycles or 17% for
9pi/4 < |x| <= 2**19pi/2 and a smaller speedup for larger x, and a
small speeddown for |x| <= 9pi/4 (only 1-2 cycles average, but that
is 4%).

Inlining this is less likely to bust caches than inlining the float
version since it is much smaller (about 220 bytes text and rodata) and
has many fewer branches.  However, the float version was already large
due to its manual inlining of the branches and also the polynomial
evaluations.
lib/msun/src/e_rem_pio2f.c
lib/msun/src/s_cosf.c
lib/msun/src/s_sinf.c
lib/msun/src/s_tanf.c