summaryrefslogtreecommitdiffstats
path: root/lib/msun/man/cimag.3
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2008-02-19 15:30:58 +0000
committerbde <bde@FreeBSD.org>2008-02-19 15:30:58 +0000
commit30565c600e032f4ffa87a25756cc0bef6e9f2f0d (patch)
tree2e36b01874df4a4d753d355f47ab0645349f9d1f /lib/msun/man/cimag.3
parente508bf1279c21ed622306af43844139988972c81 (diff)
downloadFreeBSD-src-30565c600e032f4ffa87a25756cc0bef6e9f2f0d.zip
FreeBSD-src-30565c600e032f4ffa87a25756cc0bef6e9f2f0d.tar.gz
Optimize for 3pi/4 <= |x| <= 9pi/4 in much the same way as for
pi/4 <= |x| <= 3pi/4. Use the same branch ladder as for float precision. Remove the optimization for |x| near pi/2 and don't do it near the multiples of pi/2 in the newly optimized range, since it requires fairly large code to handle only relativley few cases. Ifdef out optimization for |x| <= pi/4 since this case can't occur because it is done in callers. On amd64 (A64), for cos() and sin() with uniformly distributed args, no cache misses, some parallelism in the caller, and good but not great CC and CFLAGS, etc., this saves about 40 cycles or 38% in the newly optimized range, or about 27% on average across the range |x| <= 2pi (~65 cycles for most args, while the A64 hardware fcos and fsin take ~75 cycles for half the args and 125 cycles for the other half). The speedup for tan() is much smaller, especially relatively. The speedup on i386 (A64) is slightly smaller, especially relatively. i386 is still much slower than amd64 here (unlike in the float case where it is slightly faster).
Diffstat (limited to 'lib/msun/man/cimag.3')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud