|
From: <sv...@va...> - 2005-12-28 04:18:25
|
Author: sewardj
Date: 2005-12-28 04:18:20 +0000 (Wed, 28 Dec 2005)
New Revision: 5455
Log:
In fbench, compute sin/cos/sqrt from "first principles", so that the
program more uniformly measures the speed of FP +/-/* load/store
across different architectures.
Modified:
trunk/perf/Makefile.am
trunk/perf/fbench.c
Modified: trunk/perf/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/perf/Makefile.am 2005-12-28 00:57:48 UTC (rev 5454)
+++ trunk/perf/Makefile.am 2005-12-28 04:18:20 UTC (rev 5455)
@@ -21,6 +21,6 @@
AM_CXXFLAGS =3D $(AM_CFLAGS)
=20
# Extra stuff
-fbench_LDADD =3D -lm
+fbench_CFLAGS =3D -g -O2
+fbench_LDADD =3D=20
ffbench_LDADD =3D -lm
-
Modified: trunk/perf/fbench.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/perf/fbench.c 2005-12-28 00:57:48 UTC (rev 5454)
+++ trunk/perf/fbench.c 2005-12-28 04:18:20 UTC (rev 5455)
@@ -8,7 +8,17 @@
// site is in the public domain and may be used in any manner without
// permission, restriction, attribution, or compensation."
=20
+/* This program can be used in two ways. If INTRIG is undefined, sin,
+ cos, tan, etc, will be used as supplied by <math.h>. If it is
+ defined, then the program calculates all this stuff from first
+ principles (so to speak) and does not use the libc facilities. For
+ benchmarking purposes it seems better to avoid the libc stuff, so
+ that the inner loops (sin, sqrt) present a workload independent of
+ libc implementations on different platforms. Hence: */
=20
+#define INTRIG 1
+
+
/*
=20
John Walker's Floating Point Benchmark, derived from...
@@ -238,6 +248,7 @@
=20
*/
=20
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -289,7 +300,7 @@
tracing code. */
=20
#ifndef ITERATIONS
-#define ITERATIONS /*1000*/ /*500000*/ 125000
+#define ITERATIONS /*1000*/ /*500000*/ 80000
#endif
int niter =3D ITERATIONS; /* Iteration counter */
=20
|