This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.17-491-ge7906a4
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 2 Apr 2013 12:23:24 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.17-491-ge7906a4
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e7906a4789f9f6ac4cd4a99522832753887a8cc7 (commit)
via 92e3664bb597c61c581d02c833729d484de726ad (commit)
via 81f311c2eed308c938f995dbda97d2ec4d00b723 (commit)
from ab0f1aa99467436c38c1a3a419200f8e07cd12a5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7906a4789f9f6ac4cd4a99522832753887a8cc7
commit e7906a4789f9f6ac4cd4a99522832753887a8cc7
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue Apr 2 17:53:09 2013 +0530
Use mantissa_t in mpexp
diff --git a/ChangeLog b/ChangeLog
index 0d7e235..22b8214 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-04-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * sysdeps/ieee754/dbl-64/mpa.h (HALFRAD): Define as TWO23.
+ * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Use mantissa_t.
+
* bench/Makefile (bench): Add sin and slowsin.
* benchtests/sin-inputs: New file.
* benchtests/slowsin-inputs: New file.
diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h
index ee81f5c..0d82115 100644
--- a/sysdeps/ieee754/dbl-64/mpa.h
+++ b/sysdeps/ieee754/dbl-64/mpa.h
@@ -100,6 +100,8 @@ extern const mp_no mptwo;
#define TWO19 TWOPOW (19) /* 2^19 */
#define TWO23 TWOPOW (23) /* 2^23 */
+#define HALFRAD TWO23
+
#define TWO57 0x1.0p57 /* 2^57 */
#define TWO71 0x1.0p71 /* 2^71 */
#define TWOM1032 0x1.0p-1032 /* 2^-1032 */
@@ -107,7 +109,6 @@ extern const mp_no mptwo;
#define HALF 0x1.0p-1 /* 1/2 */
#define MHALF -0x1.0p-1 /* -1/2 */
-#define HALFRAD 0x1.0p23 /* 2^23 */
int __acr (const mp_no *, const mp_no *, int);
void __cpy (const mp_no *, mp_no *, int);
diff --git a/sysdeps/ieee754/dbl-64/mpexp.c b/sysdeps/ieee754/dbl-64/mpexp.c
index a219401..06347b7 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.c
+++ b/sysdeps/ieee754/dbl-64/mpexp.c
@@ -43,7 +43,7 @@ SECTION
__mpexp (mp_no *x, mp_no *y, int p)
{
int i, j, k, m, m1, m2, n;
- double b;
+ mantissa_t b;
static const int np[33] =
{
0, 0, 0, 0, 3, 3, 4, 4, 5, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6,
@@ -80,7 +80,7 @@ __mpexp (mp_no *x, mp_no *y, int p)
b = X[1];
m2 = 24 * EX;
for (; b < HALFRAD; m2--)
- b *= TWO;
+ b *= 2;
if (b == HALFRAD)
{
for (i = 2; i <= p; i++)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92e3664bb597c61c581d02c833729d484de726ad
commit 92e3664bb597c61c581d02c833729d484de726ad
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Mon Apr 1 14:45:54 2013 +0530
Add benchmark inputs for sin
diff --git a/ChangeLog b/ChangeLog
index e4b7af4..0d7e235 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-04-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * bench/Makefile (bench): Add sin and slowsin.
+ * benchtests/sin-inputs: New file.
+ * benchtests/slowsin-inputs: New file.
+ * benchtests/slowsin.c: New file.
+
* benchtests/Makefile: Add benchmarks for slowpow and slowexp.
(bench): Add slowexp and slowpow.
(exp-ITER): Increase iterations.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index b3dfbff..751694a 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -45,7 +45,7 @@
# See pow-inputs for an example.
subdir := benchtests
-bench := exp pow rint slowexp slowpow
+bench := exp pow rint sin slowexp slowpow slowsin
# exp function fast path
exp-ITER = 5e8
@@ -71,6 +71,12 @@ slowexp-RET = double
slowexp-INCLUDE = slowexp.c
LDFLAGS-bench-slowexp = -lm
+# sin function fast path
+sin-ITER = 3e9
+sin-ARGLIST = double
+sin-RET = double
+LDFLAGS-bench-sin = -lm
+
# pow function slowest path
slowpow-ITER = 1e5
slowpow-ARGLIST = double:double
@@ -78,5 +84,12 @@ slowpow-RET = double
slowpow-INCLUDE = slowpow.c
LDFLAGS-bench-slowpow = -lm
+# sin function slowest path
+slowsin-ITER = 3e7
+slowsin-ARGLIST = double
+slowsin-RET = double
+slowsin-INCLUDE = slowsin.c
+LDFLAGS-bench-slowsin = -lm
+
include ../Makeconfig
include ../Rules
diff --git a/benchtests/sin-inputs b/benchtests/sin-inputs
new file mode 100644
index 0000000..620cea8
--- /dev/null
+++ b/benchtests/sin-inputs
@@ -0,0 +1,7 @@
+0.9
+2.3
+3.7
+3.9
+4.0
+4.7
+5.9
diff --git a/benchtests/slowsin-inputs b/benchtests/slowsin-inputs
new file mode 100644
index 0000000..39daf80
--- /dev/null
+++ b/benchtests/slowsin-inputs
@@ -0,0 +1,7 @@
+0.93340582292648832662962377071381
+2.3328432680770916363144351635128
+3.7439477503636453548097051680088
+3.9225160069792437411706487182528
+4.0711651639931289992091478779912
+4.7858438478542097982426639646292
+5.9840767662578002727968851104379
diff --git a/benchtests/slowsin.c b/benchtests/slowsin.c
new file mode 100644
index 0000000..b6809bd
--- /dev/null
+++ b/benchtests/slowsin.c
@@ -0,0 +1,19 @@
+/* Define slowsin.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define slowsin sin
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81f311c2eed308c938f995dbda97d2ec4d00b723
commit 81f311c2eed308c938f995dbda97d2ec4d00b723
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue Apr 2 10:36:01 2013 +0530
Add benchmark tests for slowpow and slowexp
Separate benchmarks for the fast and slow implementations of pow and
exp since measuring both together doesn't make sense. Adjust the
iterations for pow and exp accordingly so that they run long enough
for the measurements to be meaningful.
diff --git a/ChangeLog b/ChangeLog
index 36890d7..e4b7af4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-04-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * benchtests/Makefile: Add benchmarks for slowpow and slowexp.
+ (bench): Add slowexp and slowpow.
+ (exp-ITER): Increase iterations.
+ (pow-ITER): Likewise.
+ * benchtests/exp-inputs: Change input.
+ * benchtests/pow-inputs: Likewise.
+ * benchtests/slowexp-inputs: New file.
+ * benchtests/slowexp.c: New file.
+ * benchtests/slowpow-inputs: New file.
+ * benchtests/slowpow.c: New file.
+
2013-04-02 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* sysdeps/powerpc/powerpc32/fpu/s_rint.S: Remove branch prediction
diff --git a/benchtests/Makefile b/benchtests/Makefile
index cc54b81..b3dfbff 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -25,7 +25,9 @@
# - Define foo-ITER with the number of iterations you want to run. Keep it
# high enough that the overhead of clock_gettime is only a small fraction of
-# the total run time of the test.
+# the total run time of the test. A good idea would be to keep the run time
+# of each test at around 10 seconds for x86_64. That is just a guideline,
+# since some scenarios may require higher run times.
# - Define foo-ARGLIST as a colon separated list of types of the input
# arguments. Use `void` if function does not take any inputs. Put in quotes
@@ -43,14 +45,16 @@
# See pow-inputs for an example.
subdir := benchtests
-bench := exp pow rint
+bench := exp pow rint slowexp slowpow
-exp-ITER = 100000
+# exp function fast path
+exp-ITER = 5e8
exp-ARGLIST = double
exp-RET = double
LDFLAGS-bench-exp = -lm
-pow-ITER = 100000
+# pow function fast path
+pow-ITER = 2e8
pow-ARGLIST = double:double
pow-RET = double
LDFLAGS-bench-pow = -lm
@@ -60,5 +64,19 @@ rint-ARGLIST = double
rint-RET = double
LDFLAGS-bench-rint = -lm
+# exp function slowest path
+slowexp-ITER = 3e5
+slowexp-ARGLIST = double
+slowexp-RET = double
+slowexp-INCLUDE = slowexp.c
+LDFLAGS-bench-slowexp = -lm
+
+# pow function slowest path
+slowpow-ITER = 1e5
+slowpow-ARGLIST = double:double
+slowpow-RET = double
+slowpow-INCLUDE = slowpow.c
+LDFLAGS-bench-slowpow = -lm
+
include ../Makeconfig
include ../Rules
diff --git a/benchtests/exp-inputs b/benchtests/exp-inputs
index a2086ba..d81cc07 100644
--- a/benchtests/exp-inputs
+++ b/benchtests/exp-inputs
@@ -1 +1 @@
-708.00096423260981737257679924368858
+42
diff --git a/benchtests/pow-inputs b/benchtests/pow-inputs
index dbb1270..2f7cc03 100644
--- a/benchtests/pow-inputs
+++ b/benchtests/pow-inputs
@@ -1 +1 @@
-1.0000000000000020, 1.5
+42.0, 42.0
diff --git a/benchtests/exp-inputs b/benchtests/slowexp-inputs
similarity index 100%
copy from benchtests/exp-inputs
copy to benchtests/slowexp-inputs
diff --git a/benchtests/slowexp.c b/benchtests/slowexp.c
new file mode 100644
index 0000000..92ac5e9
--- /dev/null
+++ b/benchtests/slowexp.c
@@ -0,0 +1,19 @@
+/* Define slowexp.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define slowexp exp
diff --git a/benchtests/pow-inputs b/benchtests/slowpow-inputs
similarity index 100%
copy from benchtests/pow-inputs
copy to benchtests/slowpow-inputs
diff --git a/benchtests/slowpow.c b/benchtests/slowpow.c
new file mode 100644
index 0000000..08f436d
--- /dev/null
+++ b/benchtests/slowpow.c
@@ -0,0 +1,19 @@
+/* Define slowpow.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define slowpow pow
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 21 +++++++++++++++
benchtests/Makefile | 39 ++++++++++++++++++++++++++---
benchtests/exp-inputs | 2 +-
benchtests/pow-inputs | 2 +-
benchtests/sin-inputs | 7 +++++
benchtests/{exp-inputs => slowexp-inputs} | 0
benchtests/slowexp.c | 19 ++++++++++++++
benchtests/{pow-inputs => slowpow-inputs} | 0
benchtests/slowpow.c | 19 ++++++++++++++
benchtests/slowsin-inputs | 7 +++++
benchtests/slowsin.c | 19 ++++++++++++++
sysdeps/ieee754/dbl-64/mpa.h | 3 +-
sysdeps/ieee754/dbl-64/mpexp.c | 4 +-
13 files changed, 133 insertions(+), 9 deletions(-)
create mode 100644 benchtests/sin-inputs
copy benchtests/{exp-inputs => slowexp-inputs} (100%)
create mode 100644 benchtests/slowexp.c
copy benchtests/{pow-inputs => slowpow-inputs} (100%)
create mode 100644 benchtests/slowpow.c
create mode 100644 benchtests/slowsin-inputs
create mode 100644 benchtests/slowsin.c
hooks/post-receive
--
GNU C Library master sources