This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add sqrt performance test
- From: Andreas Jaeger <aj at suse dot com>
- To: Steve Ellcey <sellcey at mips dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 28 Nov 2013 07:42:35 +0100
- Subject: Re: [PATCH] Add sqrt performance test
- Authentication-results: sourceware.org; auth=none
- References: <cf183992-8b0e-4439-b651-f3da33cda74d at BAMAIL02 dot ba dot imgtec dot org> <CAAHN_R0wRumvcBkfeCAjP5MTbqOpoqXBPoJMdJY4jCyDaant8g at mail dot gmail dot com> <524E3C70 dot 4070800 at redhat dot com> <CAAHN_R1by6DgiWMqUL1sBzQt5FLRewanfQA0JNg43hT=5EZbJg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1310041507420 dot 28946 at digraph dot polyomino dot org dot uk> <1381437348 dot 31594 dot 14 dot camel at ubuntu-sellcey>
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