public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Use -fno-builtin for sqrt benchmark
@ 2016-10-21 17:05 Joseph Myers
  2016-10-21 21:15 ` Tulio Magno Quites Machado Filho
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2016-10-21 17:05 UTC (permalink / raw)
  To: libc-alpha

This patch makes the sqrt benchmark use -fno-builtin, as already done
for benchmarks of ffs and ffsll, so that it actually benchmarks the
glibc function as (presumably) intended even in the presence of the
compiler inlining sqrt.

Tested for x86_64 and also used for benchmarking my ARM sqrt patch.

2016-10-21  Joseph Myers  <joseph@codesourcery.com>

	* benchtests/Makefile (CFLAGS-bench-sqrt.c): New variable.

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 144b32e..5a61522 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -72,6 +72,7 @@ benchset := $(string-benchset-all) $(stdlib-benchset) $(stdio-common-benchset) \
 
 CFLAGS-bench-ffs.c += -fno-builtin
 CFLAGS-bench-ffsll.c += -fno-builtin
+CFLAGS-bench-sqrt.c += -fno-builtin
 
 bench-malloc := malloc-thread
 

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Use -fno-builtin for sqrt benchmark
  2016-10-21 17:05 Use -fno-builtin for sqrt benchmark Joseph Myers
@ 2016-10-21 21:15 ` Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; 2+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2016-10-21 21:15 UTC (permalink / raw)
  To: Joseph Myers, libc-alpha

Joseph Myers <joseph@codesourcery.com> writes:

> This patch makes the sqrt benchmark use -fno-builtin, as already done
> for benchmarks of ffs and ffsll, so that it actually benchmarks the
> glibc function as (presumably) intended even in the presence of the
> compiler inlining sqrt.
>
> Tested for x86_64 and also used for benchmarking my ARM sqrt patch.
>
> 2016-10-21  Joseph Myers  <joseph@codesourcery.com>
>
> 	* benchtests/Makefile (CFLAGS-bench-sqrt.c): New variable.
>
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index 144b32e..5a61522 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -72,6 +72,7 @@ benchset := $(string-benchset-all) $(stdlib-benchset) $(stdio-common-benchset) \
>
>  CFLAGS-bench-ffs.c += -fno-builtin
>  CFLAGS-bench-ffsll.c += -fno-builtin
> +CFLAGS-bench-sqrt.c += -fno-builtin
>
>  bench-malloc := malloc-thread

LGTM.

-- 
Tulio Magno

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-21 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 17:05 Use -fno-builtin for sqrt benchmark Joseph Myers
2016-10-21 21:15 ` Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).