This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add sqrt performance test

After reading the replies to my email about adding a sqrt performance
test here is the patch I came up with.  Since I am not willing to do
the amount of analysis that Siddhesh proposed (analyzing the various
branch points in the sqrt routine) and since many chips just use a sqrt
instruction anyway, I just took the 'normal' inputs from the sqrt
correctness test and used them as the input for the sqrt performance test.

I had to update the patch to account for changes to the benchtests Makefile
and I tested this on MIPS to verify that it ran OK.

OK to checkin?

2013-10-10  Steve Ellcey  <>

	* benchtests/Makefile (bench): Add sqrt.
	(LDLIBS-bench-sqrt): New.
	* benchtests/sqrt-input: New.

diff --git a/benchtests/Makefile b/benchtests/Makefile
index aec395a..768591b 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -21,7 +21,7 @@
 subdir := benchtests
 bench := acos acosh asin asinh atan atanh cos cosh exp log modf pow rint sin \
-	 sincos sinh tan tanh
+	 sincos sinh sqrt tan tanh
 # String function benchmarks.
 string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
@@ -48,6 +48,7 @@ LDLIBS-bench-pow = -lm
 LDLIBS-bench-rint = -lm
 LDLIBS-bench-sin = -lm
 LDLIBS-bench-sinh = -lm
+LDLIBS-bench-sqrt = -lm
 LDLIBS-bench-tan = -lm
 LDLIBS-bench-tanh = -lm
 LDLIBS-bench-sincos = -lm
diff --git a/benchtests/sqrt-inputs b/benchtests/sqrt-inputs
new file mode 100644
index 0000000..370bc05
--- /dev/null
+++ b/benchtests/sqrt-inputs
@@ -0,0 +1,10 @@
+## args: double
+## ret: double
+## includes: math.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]