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

Bruce Evans bde at FreeBSD.org
Mon Dec 19 17:21:31 PST 2005


bde         2005-12-20 01:21:30 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         s_cbrt.c 
  Log:
  Extract the high and low words together.  With gcc-3.4 on uniformly
  distributed non-large args, this saves about 14 of 134 cycles for
  Athlon64s and about 5 of 199 cycles for AthlonXPs.
  
  Moved the check for x == 0 inside the check for subnormals.  With
  gcc-3.4 on uniformly distributed non-large args, this saves another
  5 cycles on Athlon64s and loses 1 cycle on AthlonXPs.
  
  Use INSERT_WORDS() and not SET_HIGH_WORD() when converting the first
  approximation from bits to double.  With gcc-3.4 on uniformly distributed
  non-large args, this saves another 4 cycles on both Athlon64s and and
  AthlonXPs.
  
  Accessing doubles as 2 words may be an optimization on old CPUs, but on
  current CPUs it tends to cause extra operations and pipeline stalls,
  especially for writes, even when only 1 of the words needs to be accessed.
  
  Removed an unused variable.
  
  Revision  Changes    Path
  1.14      +6 -8      src/lib/msun/src/s_cbrt.c


More information about the cvs-src mailing list