RFR: 8285868: x86 intrinsics for floating point method isInfinite [v9]

Srinivas Vamsi Parasa duke at openjdk.java.net
Wed Jun 1 07:07:38 UTC 2022


On Tue, 24 May 2022 22:00:20 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Srinivas Vamsi Parasa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
>> 
>>  - Remove support for non vfpclasss/d based intrinsics
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into float
>>  - add comment for vfpclasss/d for isFinite()
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into float
>>  - zero out the upper bits not written by setb
>>  - use 0x1 to be simpler
>>  - remove the redundant temp register
>>  - Split the macros using predicate
>>  - update jmh tests
>>  - Merge branch 'master' into float
>>  - ... and 1 more: https://git.openjdk.java.net/jdk/compare/c1db70d8...70bba0fe
>
> 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%

-------------

PR: https://git.openjdk.java.net/jdk/pull/8459


More information about the hotspot-compiler-dev mailing list