Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2008 17:26:24 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/msun/src e_rem_pio2.c
Message-ID:  <200802221726.m1MHQOC3033513@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         2008-02-22 17:26:24 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         e_rem_pio2.c 
  Log:
  Remove the "quick check no cancellation" optimization for
  9pi/2 < |x| < 32pi/2 since it is only a small or negative optimation
  and it gets in the way of further optimizations.  It did one more
  branch to avoid some integer operations and to use a different
  dependency on previous results.  The branches are fairly predictable
  so they are usually not a problem, so whether this is a good
  optimization depends mainly on the timing for the previous results,
  which is very machine-dependent.  On amd64 (A64), this "optimization"
  is a pessimization of about 1 cycle or 1%; on ia64, it is an
  optimization of about 2 cycles or 1%; on i386 (A64), it is an
  optimization of about 5 cycles or 4%; on i386 (Celeron P2) it is an
  optimization of about 4 cycles or 3% for cos but a pessimization of
  about 5 cycles for sin and 1 cycle for tan.  I think the new i386
  (A64) slowness is due to an pipeline stall due to an avoidable
  load-store mismatch (so the old timing was better), and the i386
  (Celeron) variance is due to its branch predictor not being too good.
  
  Revision  Changes    Path
  1.13      +1 -12     src/lib/msun/src/e_rem_pio2.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802221726.m1MHQOC3033513>