[PATCH 1/3] Use generic vector computations in s_sincosf.h
Carlos O'Donell
carlos@redhat.com
Fri Dec 14 20:55:00 GMT 2018
On 12/14/18 2:39 PM, Wilco Dijkstra wrote:
> Hi,
>
> I finally had a chance to benchmark this on a recent core using the traces posted
> here: https://www.sourceware.org/ml/libc-alpha/2018-12/msg00492.html
> I used the same trace for sincosf but this requires a small wrapper to accurately
> measure latency and throughput - I'll post the patch for this next week.
>
> On Sandy Bridge I get 10% gain in throughput with the vector FMA version of sincosf
> (at the cost of ~2% extra latency), but unfortunately it's 5% slower on AArch64
> and latency increases by 10% due to GCC using some unnecessary DUPs and
> lane inserts. Sinf and cosf are also affected by the data layout change, throughput
> and latency are 1.7% and 1.0% worse respectively.
>
> So it seems the best approach would be to make the vector version conditional on
> a macro defined by the target so each target can choose the fastest variant.
In general I agree.
I wonder what is the cost of using a tunable with defaults set differently by
architecture?
This way if a architectural licensee does something different for AArch64 that
changes this back the other way they could tune it differently with a global
env var setting?
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list