freebsd-nq/lib
Bruce Evans 833f0e1a4a Minor cleanups and optimizations:
- Remove dead code that I forgot to remove in the previous commit.

- Calculate the sum of the lower terms of the polynomial (divided by
  x**5) in a single expression (sum of odd terms) + (sum of even terms)
  with parentheses to control grouping.  This is clearer and happens to
  give better instruction scheduling for a tiny optimization (an
  average of about ~0.5 cycles/call on Athlons).

- Calculate the final sum in a single expression with parentheses to
  control grouping too.  Change the grouping from
  first_term + (second_term + sum_of_lower_terms) to
  (first_term + second_term) + sum_of_lower_terms.  Normally the first
  grouping must be used for accuracy, but extra precision makes any
  grouping give a correct result so we can group for efficiency.  This
  is a larger optimization (average 3-4 cycles/call or 5%).

- Use parentheses to indicate that the C order of left to right evaluation
  is what is wanted (for efficiency) in a multiplication too.

The old fdlibm code has several optimizations related to these.  2
involve doing an extra operation that can be done almost in parallel
on some superscalar machines but are pessimizations on sequential
machines.  Others involve statement ordering or expression grouping.
All of these except the ordering for the combining the sums of the odd
and even terms seem to be ideal for Athlons, but parallelism is still
limited so all of these optimizations combined together with the ones
in this commit save only ~6-8 cycles (~10%).

On an AXP, tanf() on uniformly distributed args in [-2pi, 2pi] now
takes 39-59 cycles.  I don't know of any more optimizations for tanf()
short of writing it all in asm with very MD instruction scheduling.
Hardware fsin takes 122-138 cycles.  Most of the optimizations for
tanf() don't work very well for tan[l]().  fdlibm tan() now takes
145-365 cycles.
2005-11-24 13:48:40 +00:00
..
bind Finish the removal of threads support in ../config.mk,v 1.15. 2005-11-07 15:22:35 +00:00
csu Fixed profiling of main() for amd64 and i386. This started rotting 2005-10-07 22:13:17 +00:00
libalias
libarchive Fix prototypes. 2005-11-24 10:06:05 +00:00
libatm
libautofs
libbegemot
libbluetooth
libbsnmp Catch up with the import of bsnmp-1.11. Add a couple of new 2005-10-04 15:02:07 +00:00
libbz2
libc Make SYNOPSIS compile. 2005-11-24 07:48:19 +00:00
libc_r
libcalendar
libcam
libcom_err
libcompat
libcrypt
libdevinfo
libdevstat Remove an unused variable. 2005-10-04 22:00:35 +00:00
libdisk Fix prototypes. 2005-11-24 10:30:44 +00:00
libedit Fix prototype. 2005-11-24 10:32:39 +00:00
libexpat
libfetch
libform Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libftpio
libgeom Fix prototype. 2005-11-24 10:43:35 +00:00
libgpib
libio
libipsec
libipx
libkiconv
libkse o Include <sys/time.h> 2005-11-19 04:47:06 +00:00
libkvm Fix a well duplicated fencepost error that stopped crashdumps being 2005-10-20 05:41:38 +00:00
libmagic Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libmd -mdoc sweep. 2005-11-17 13:00:00 +00:00
libmemstat Tidy up markup and fix two bugs. 2005-11-21 17:18:34 +00:00
libmenu Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libmilter
libmp Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libncp Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libncurses
libnetgraph Recognize all current standard node types. 2005-10-25 20:58:30 +00:00
libngatm
libopie
libpam Commenting out WARNS actually brought it up to 4. 2005-09-28 14:36:16 +00:00
libpanel Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libpcap
libpmc Fix prototypes. 2005-11-24 10:54:47 +00:00
libpthread o Include <sys/time.h> 2005-11-19 04:47:06 +00:00
libradius Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
librpcsvc
libsbuf
libsdp
libsm
libsmb Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
libsmdb
libsmutil
libstand Fix prototypes. 2005-11-24 11:14:06 +00:00
libtacplus
libtelnet
libthr Fix name compatible problem with POSIX standard. the sigval_ptr and 2005-11-04 09:41:00 +00:00
libthread_db
libufs minor style.Makefile(5) fixes: 2005-09-26 06:23:43 +00:00
libugidfw
libusbhid Fix prototypes. 2005-11-24 11:26:36 +00:00
libutil Fix prototype. 2005-11-24 11:29:11 +00:00
libvgl
libwrap
liby
libypclnt
libz
msun Minor cleanups and optimizations: 2005-11-24 13:48:40 +00:00
ncurses Add missing shared library interdependencies. 2005-11-10 18:07:07 +00:00
Makefile Disconnect libc_r from buildworld, it is still kept in the tree to 2005-10-27 03:09:20 +00:00
Makefile.inc