diff options
author | bde <bde@FreeBSD.org> | 2008-02-22 18:43:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2008-02-22 18:43:23 +0000 |
commit | 26ba55ab669e6e8cdd7f8fd2971dda8b8705a9f0 (patch) | |
tree | c685d7ecf2d6bb5820cc55706947c63ce7813007 /etc/pam.d/passwd | |
parent | e31bf4b688423b9d648923a471ed8a41940b9432 (diff) | |
download | FreeBSD-src-26ba55ab669e6e8cdd7f8fd2971dda8b8705a9f0.zip FreeBSD-src-26ba55ab669e6e8cdd7f8fd2971dda8b8705a9f0.tar.gz |
Avoid using FP-to-integer conversion for !(amd64 || i386) too. Use the
FP-to-FP method to round to an integer on all arches, and convert this
to an int using FP-to-integer conversion iff irint() is not available.
This is cleaner and works well on at least ia64, where it saves 20-30
cycles or about 10% on average for 9Pi/4 < |x| <= 32pi/2 (should be
similar up to 2**19pi/2, but I only tested the smaller range).
After the previous commit to e_rem_pio2.c removed the "quick check no
cancellation" non-optimization, the result of the FP-to-integer
conversion is not needed so early, so using irint() became a much
smaller optimization than when it was committed.
An earlier commit message said that cos, cosf, sin and sinf were equally
fast on amd64 and i386 except for cos and sin on i386. Actually, cos
and sin on amd64 are equally fast to cosf and sinf on i386 (~88 cycles),
while cosf and sinf on amd64 are not quite equally slow to cos and sin
on i386 (average 115 cycles with more variance).
Diffstat (limited to 'etc/pam.d/passwd')
0 files changed, 0 insertions, 0 deletions