summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2008-03-30 18:07:12 +0000
committerbde <bde@FreeBSD.org>2008-03-30 18:07:12 +0000
commit2916ad3e28c0f7fea67ffe9b7af7f51b6e3aaaf0 (patch)
tree94cad26c2877839b64fe3a8e8a6b961683a86d57 /sys/netncp
parentb06e3a074e790b19403a03d0155466a343805194 (diff)
downloadFreeBSD-src-2916ad3e28c0f7fea67ffe9b7af7f51b6e3aaaf0.zip
FreeBSD-src-2916ad3e28c0f7fea67ffe9b7af7f51b6e3aaaf0.tar.gz
Use fabs[f]() instead of bit fiddling for setting absolute values.
This makes little difference in float precision, but in double precision gives a speedup of about 30% on amd64 (A64 CPU) and i386 (A64). This depends on fabs[f]() being inline and efficient. The bit fiddling (or any use of SET_HIGH_WORD(), which libm does too much because it was best on old 32-bit machines) always causes packing overheads and sometimes causes stalls in the packing, since it operates on only part of a variable in the double precision case. It apparently did cause stalls in a critical path here.
Diffstat (limited to 'sys/netncp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud