RFR: 8285868: x86 intrinsics for floating point method isInfinite [v9]
Vladimir Kozlov
kvn at openjdk.java.net
Wed Jun 1 16:05:40 UTC 2022
On Wed, 1 Jun 2022 07:05:34 GMT, Srinivas Vamsi Parasa <duke at openjdk.java.net> wrote:
>> I assume `Baseline` data includes #8525 changes. Right?
>
> Hello Validmir (@vnkozlov),
>
> After reviewing the JMH performance data, it was observed that only the` isInfinite()` method sees performance benefit using intrinsics (`vfpclassss/d` instruction). Thus, this PR is updated to support intrinsics for **only** the `isInfinite()` method.
>
> Please see the performance data below for all the 3 methods. Please let me know if anything else is needed.
>
>
> Benchmark (ns/op) Baseline Intrinsic Speedup (%)
> (vfpclassss)
> -------------------------------------------------------------------
> FloatClassCheck.testIsFiniteBranch 1.558 1.535 1%
> FloatClassCheck.testIsFiniteCMov 0.335 0.428 -28%
> FloatClassCheck.testIsFiniteStore 0.417 0.253 39%
> ---------------------------------------------------------------------
> FloatClassCheck.testIsInfiniteBranch 1.294 1.046 19%
> FloatClassCheck.testIsInfiniteCMov 0.823 0.351 57%
> FloatClassCheck.testIsInfiniteStore 0.748 0.234 69%
> ----------------------------------------------------------------------
> FloatClassCheck.testIsNaNBranch 1 1.147 -15%
> FloatClassCheck.testIsNaNCMov 0.297 0.352 -19%
> FloatClassCheck.testIsNaNStore 0.362 0.234 35%
>
> *********************************************************************
>
> Benchmark (ns/op) Baseline Intrinsic Speedup (%)
> (vfpclasssd)
> ------------------------------------------------------------------------
> DoubleClassCheck.testIsFiniteBranch 1.555 1.522 2%
> DoubleClassCheck.testIsFiniteCMov 0.325 0.444 -37%
> DoubleClassCheck.testIsFiniteStore 0.322 0.266 17%
> -----------------------------------------------------------------------
> DoubleClassCheck.testIsInfiniteBranch 1.261 1.094 13%
> DoubleClassCheck.testIsInfiniteCMov 0.821 0.373 55%
> DoubleClassCheck.testIsInfiniteStore 0.858 0.235 73%
> -----------------------------------------------------------------------
> DoubleClassCheck.testIsNaNBranch 1 1.127 -13%
> DoubleClassCheck.testIsNaNCMov 0.278 0.373 -34%
> DoubleClassCheck.testIsNaNStore 0.283 0.235 17%
@vamsi-parasa can you show difference in generated code for `DoubleClassCheck.testIsFiniteCMov ` for example? Or may be for all of them (for DoubleClassCheck).
I am fine with intrinsifying only `isInfinite()` but would like to see code for the record.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8459
More information about the hotspot-compiler-dev
mailing list