cvs commit: src/lib/msun/src s_exp2f.c

Bruce Evans bde at
Wed Feb 13 00:36:14 PST 2008

bde         2008-02-13 08:36:13 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         s_exp2f.c 
  Rearrange the polynomial evaluation for better parallelism.  This is
  faster on all machines tested (old Celeron (P2), A64 (amd64 and i386)
  and ia64) except on ia64 when compiled with -O1.  It takes 2 more
  multiplications, so it will be slower on old machines.  The speedup
  is about 8 cycles = 17% on A64 (amd64 and i386) with best CFLAGS
  and some parallelism in the caller.
  Move the evaluation of 2**k up a bit so that it doesn't compete too
  much with the new polynomial evaluation.  Unlike the previous
  optimization, this rearrangement cannot change the result, so compilers
  and CPU schedulers can do it, but they don't do it quite right yet.
  This saves a whole 1 or 2 cycles on A64.
  Revision  Changes    Path
  1.7       +4 -3      src/lib/msun/src/s_exp2f.c

More information about the cvs-src mailing list