[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics, approval request
Andrew Haley
aph at redhat.com
Wed Feb 20 17:39:53 UTC 2019
On 2/19/19 3:16 PM, B. Blaser wrote:
> So, I did some experiments and it seems that the most important
> branch is the last one.
> If data is well balanced like in the initial benchmark I posted,
> branch prediction is poor and the intrinsic is 2x faster, in all
> other cases it'd be better to avoid it:
I tried this an it seems to work.
This idea looks extremely promising. It's not perfect in that there
are still datasets that confuse it, but it's surely an improvement
over what we have today.
Vladimir, what say you? This is a useful heuristic which avoids
performance regressions caused by min/max in almost all cases. I say
we want it.
NB: this heuristic is probably good for CMOV instructions too.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list