[PATCH] Add sqrt performance test
Andreas Jaeger
aj@suse.com
Fri Nov 29 00:40:00 GMT 2013
On 10/10/2013 10:35 PM, Steve Ellcey wrote:
> 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?
Yes, let's get this in - and if then anybody follows up with more
inputs, it would be appreciated,
Andreas
>
>
> 2013-10-10 Steve Ellcey <sellcey@mips.com>
>
> * 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
> +0.25
> +0.75
> +2.0
> +4.0
> +2209.0
> +6642.25
> +15190.5625
>
>
>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list