RFR: 8285868: x86 intrinsics for floating point methods isNaN, isFinite and isInfinite [v10]
Srinivas Vamsi Parasa
duke at openjdk.java.net
Tue May 24 22:53:20 UTC 2022
> We develop optimized x86 intrinsics for the floating point class check methods `isNaN()`, `isFinite()` and `IsInfinite()` for Float and Double classes. JMH benchmarks show upto `~70% `improvement using` vfpclasss(s/d)` instructions.
>
>
> Benchmark (ns/op) Baseline Intrinsic(vfpclasss/d) Speedup(%)
> FloatClassCheck.testIsFinite 0.562 0.406 28%
> FloatClassCheck.testIsInfinite 0.815 0.383 53%
> FloatClassCheck.testIsNaN 0.63 0.382 39%
> DoubleClassCheck.testIsFinite 0.565 0.409 28%
> DoubleClassCheck.testIsInfinite 0.812 0.375 54%
> DoubleClassCheck.testIsNaN 0.631 0.38 40%
> FPComparison.isFiniteDouble 332.638 272.577 18%
> FPComparison.isFiniteFloat 413.217 331.825 20%
> FPComparison.isInfiniteDouble 874.897 240.632 72%
> FPComparison.isInfiniteFloat 872.279 321.269 63%
> FPComparison.isNanDouble 286.566 240.36 16%
> FPComparison.isNanFloat 346.123 316.923 8%
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 13 commits:
- update vmstructs
- Merge branch 'master' of https://git.openjdk.java.net/jdk into float
- 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
- ... and 3 more: https://git.openjdk.java.net/jdk/compare/9b7e42c0...dca4ec4c
-------------
Changes: https://git.openjdk.java.net/jdk/pull/8459/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8459&range=09
Stats: 668 lines in 19 files changed: 666 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