RFR: 8285868: x86_64 intrinsics for floating point methods isNaN, isFinite and isInfinite [v9]
Srinivas Vamsi Parasa
duke at openjdk.java.net
Tue May 24 20:31:53 UTC 2022
> We develop optimized x86_64 intrinsics for the floating point class check methods `isNaN()`, `isFinite()` and `IsInfinite()` for Float and Double classes. JMH benchmarks show ~6x improvement for `isNan()`, ~2x improvement for `isInfinite()` and 40% gain for `isFinite()` using` vfpclasss(s/d)` instructions.
>
>
> JMH Benchmark (ns/op) Baseline This PR (WITH vfpclassss/sd) Speedup
>
> FloatClassCheck.testIsFinite 0.559 0.4 1.4x
> FloatClassCheck.testIsInfinite 0.828 0.386 2.15x
> FloatClassCheck.testIsNaN 2.589 0.387 6.7x
> DoubleClassCheck.testIsFinite 0.568 0.414 1.37x
> DoubleClassCheck.testIsInfinite 0.836 0.395 2.11x
> DoubleClassCheck.testIsNaN 2.592 0.393 6.6x
>
> JMH Benchmark (ns/op) Baseline This PR (WITHOUT vfpclassss/sd) Speedup
> FloatClassCheck.testIsFinite 0.561 0.468 1.2x
> FloatClassCheck.testIsInfinite 0.793 0.491 1.61x
> FloatClassCheck.testIsNaN 2.587 0.469 5.5x
> DoubleClassCheck.testIsFinite 0.561 0.592 0.94x
> DoubleClassCheck.testIsInfinite 0.828 0.592 1.4x
> DoubleClassCheck.testIsNaN 2.593 0.594 4.4x
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
-------------
Changes: https://git.openjdk.java.net/jdk/pull/8459/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8459&range=08
Stats: 663 lines in 19 files changed: 661 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/8459.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8459/head:pull/8459
PR: https://git.openjdk.java.net/jdk/pull/8459
More information about the hotspot-compiler-dev
mailing list