Hi, Marcus.
I've run Geekbench, SPEC CPU2000 and synthetic benchmarks.
I can share these results iterating an array with values between 1 and 1000000
and taking their square root:
Million Operations/s Juno
A53 @850MHz A57 @1100MHz
X^½ DP Canon 31 37
Newton 13 39
%Δ -57% 6%
SP Canon 48 144
Newton 18 62
%Δ -63% -57%
X^-½ DP Canon 17 16
Newton 14 42
%Δ -17% 155%
SP Canon 28 70
Newton 20 62
%Δ -30% -11%
As you can see, it's a mixed result for A57 and a definite regression for A53.
In mnost benchmarks overall, this is not a good optimization for A57. That's
why I left it as a target-specific tuning.
Thank you,
--
Evandro Menezes Austin, TX
> -----Original Message-----
> From: Marcus Shawcroft [mailto:[email protected]]
> Sent: Wednesday, December 09, 2015 8:06
> To: Evandro Menezes
> Cc: GCC Patches; Marcus Shawcroft; James Greenhalgh; Andrew Pinski; Benedikt
> Huber; [email protected]
> Subject: Re: [AArch64] Emit square root using the Newton series
>
> On 8 December 2015 at 21:35, Evandro Menezes <[email protected]> wrote:
> > Emit square root using the Newton series
> >
> > 2015-12-03 Evandro Menezes <[email protected]>
> >
> > gcc/
> > * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt):
> > Declare new
> > function.
> > * config/aarch64/aarch64-simd.md (sqrt<mode>2): New
> > expansion and
> > insn definitions.
> > * config/aarch64/aarch64-tuning-flags.def
> > (AARCH64_EXTRA_TUNE_FAST_SQRT): New tuning macro.
> > * config/aarch64/aarch64.c (aarch64_emit_swsqrt): Define
> > new function.
> > * config/aarch64/aarch64.md (sqrt<mode>2): New expansion
> > and insn
> > definitions.
> > * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt):
> > Expand option
> > description.
> > * doc/invoke.texi (mlow-precision-recip-sqrt): Likewise.
> >
> > This patch extends the patch that added support for implementing
> > x^-1/2 using the Newton series by adding support for x^1/2 as well.
>
> Hi Evandro, What benchmarking have you done on this patch?
> /M