Bruce Evans
f4b01a9edf
Rearranged the polynomial evaluation to reduce dependencies, as in
...
k_tanf.c but with different details.
The polynomial is odd with degree 13 for tanf() and odd with degree
9 for sinf(), so the details are not very different for sinf() -- the
term with the x**11 and x**13 coefficients goes awaym and (mysteriously)
it helps to do the evaluation of w = z*z early although moving it later
was a key optimization for tanf(). The details are different but simpler
for cosf() because the polynomial is even and of lower degree.
On Athlons, for uniformly distributed args in [-2pi, 2pi], this gives
an optimization of about 4 cycles (10%) in most cases (13% for sinf()
on AXP, but 0% for cosf() with gcc-3.3 -O1 on AXP). The best case
(sinf() with gcc-3.4 -O1 -fcaller-saves on A64) now takes 33-39 cycles
(was 37-45 cycles). Hardware sinf takes 74-129 cycles. Despite
being fine tuned for Athlons, the optimization is even larger on
some other arches (about 15% on ia64 (pluto2) and 20% on alpha (beast)
with gcc -O2 -fomit-frame-pointer).
2005-11-30 11:51:17 +00:00
..
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2004-06-02 17:09:05 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-11-13 00:08:23 +00:00
2005-02-04 18:26:06 +00:00
2005-11-30 04:56:49 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-11-28 08:32:15 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2005-11-12 18:20:09 +00:00
2005-02-04 18:26:06 +00:00
2004-06-01 19:33:30 +00:00
2005-02-04 18:26:06 +00:00
2005-11-23 03:03:09 +00:00
2005-02-04 18:26:06 +00:00
2005-02-04 18:26:06 +00:00
2004-07-09 10:01:10 +00:00
2005-02-04 18:26:06 +00:00
2005-11-13 00:41:46 +00:00
2005-02-04 18:26:06 +00:00
2005-10-26 12:36:18 +00:00
2005-11-30 11:51:17 +00:00
2005-02-04 18:26:06 +00:00
2005-10-11 07:56:05 +00:00
2005-11-02 13:06:49 +00:00
2005-11-30 11:51:17 +00:00
2005-11-02 14:01:45 +00:00
2005-11-28 11:46:20 +00:00
2005-11-28 04:58:57 +00:00
2005-04-16 21:12:47 +00:00
2003-07-23 04:53:47 +00:00
2003-07-23 04:53:47 +00:00
2005-04-28 19:45:55 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2003-07-23 04:53:47 +00:00
2003-07-23 04:53:47 +00:00
2004-05-07 18:56:31 +00:00
2005-10-24 14:08:36 +00:00
2005-11-30 06:47:18 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2004-05-30 09:21:56 +00:00
2005-04-05 02:57:15 +00:00
2005-04-05 02:57:15 +00:00
2003-10-25 19:53:28 +00:00
2004-06-30 07:04:01 +00:00
2003-07-23 04:53:47 +00:00
2003-07-23 04:53:47 +00:00
2005-04-28 19:45:55 +00:00
2005-03-18 02:27:59 +00:00
2005-01-22 09:53:18 +00:00
2005-03-18 02:27:59 +00:00
2004-06-30 07:04:01 +00:00
2004-06-30 07:04:01 +00:00
2004-06-30 07:04:01 +00:00
2004-06-30 07:04:01 +00:00
2004-06-30 07:04:01 +00:00
2004-06-30 07:04:01 +00:00
2005-03-07 21:27:37 +00:00
2005-03-07 04:54:51 +00:00
2004-10-09 17:14:28 +00:00
2004-10-09 17:14:28 +00:00
2004-10-11 18:13:52 +00:00
2004-07-09 03:32:40 +00:00
2004-08-05 01:46:11 +00:00
2004-07-09 03:32:40 +00:00
2005-01-11 23:12:55 +00:00
2005-01-11 23:12:55 +00:00
2005-04-08 00:52:27 +00:00
2005-04-08 00:52:27 +00:00
2005-04-08 01:24:08 +00:00
2003-07-23 04:53:47 +00:00
2005-01-11 23:12:55 +00:00
2005-01-11 23:12:55 +00:00
2005-04-08 00:52:16 +00:00
2005-04-08 00:52:27 +00:00
2005-04-08 01:24:08 +00:00
2004-07-06 04:46:08 +00:00
2005-03-07 21:27:37 +00:00
2005-03-07 04:55:58 +00:00
2005-03-07 04:56:46 +00:00
2005-03-07 04:56:46 +00:00
2005-03-07 04:57:38 +00:00
2005-03-25 04:40:44 +00:00
2005-03-25 04:40:44 +00:00
2005-03-07 20:28:26 +00:00
2004-06-09 21:24:52 +00:00
2005-01-13 15:43:41 +00:00
2005-01-13 15:43:41 +00:00
2005-04-08 01:24:08 +00:00
2005-03-07 04:57:50 +00:00
2005-03-07 21:27:37 +00:00
2005-03-07 04:52:43 +00:00
2005-03-07 04:52:58 +00:00
2004-07-19 08:16:10 +00:00
2003-07-23 04:53:47 +00:00
2005-10-24 14:08:36 +00:00
2005-11-28 06:15:10 +00:00
2005-11-02 14:01:45 +00:00
2005-11-28 05:35:32 +00:00
2004-06-20 09:25:43 +00:00
2004-06-20 09:25:43 +00:00
2005-04-28 19:45:55 +00:00
2004-07-28 05:53:18 +00:00