diff options
author | bde <bde@FreeBSD.org> | 2005-11-21 04:57:12 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2005-11-21 04:57:12 +0000 |
commit | d8a5fc0b49835059d3f35f4b6e105b9c360dac79 (patch) | |
tree | 45bbeec89e517c4e748f40746486e2deedeb4076 /lib/msun/src/k_sinf.c | |
parent | 3b3fcd18bf398cd942cf88cb7f5cc7a6aae1a25a (diff) | |
download | FreeBSD-src-d8a5fc0b49835059d3f35f4b6e105b9c360dac79.zip FreeBSD-src-d8a5fc0b49835059d3f35f4b6e105b9c360dac79.tar.gz |
Mess up the "kernel" float trig function .c files with ifdefs so that
they can be #included in other .c files to give inline functions, and
use them to inline the functions in most callers (not in e_lgammaf_r.c).
__kernel_tanf() is too large and complicated for gcc to inline very well.
An athlons, this gives a speed increase under favourable pipeline
conditions of about 10% overall (larger for AXP, smaller for A64).
E.g., on AXP, sinf() on uniformly distributed args in [-2Pi, 2Pi]
now takes 30-56 cycles; it used to take 45-61 cycles; hardware fsin
takes 65-129.
Diffstat (limited to 'lib/msun/src/k_sinf.c')
-rw-r--r-- | lib/msun/src/k_sinf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/msun/src/k_sinf.c b/lib/msun/src/k_sinf.c index d393db7..ad8d9de 100644 --- a/lib/msun/src/k_sinf.c +++ b/lib/msun/src/k_sinf.c @@ -14,9 +14,11 @@ * ==================================================== */ +#ifndef INLINE_KERNEL_SINF #ifndef lint static char rcsid[] = "$FreeBSD$"; #endif +#endif #include "math.h" #include "math_private.h" @@ -29,6 +31,9 @@ S2 = 0x8888bb.0p-30, /* 0.0083333803341 */ S3 = -0xd02de1.0p-36, /* -0.00019853517006 */ S4 = 0xbe6dbe.0p-42; /* 0.0000028376084629 */ +#ifdef INLINE_KERNEL_SINF +extern inline +#endif float __kernel_sinf(float x, float y, int iy) { |