RFR: 8285868: x86_64 intrinsics for floating point methods isNaN, isFinite and isInfinite [v6]

Jatin Bhateja jbhateja at openjdk.java.net
Wed May 18 19:31:43 UTC 2022


On Wed, 18 May 2022 06:57:38 GMT, Srinivas Vamsi Parasa <duke at openjdk.java.net> wrote:

>> test/micro/org/openjdk/bench/java/lang/DoubleClassCheck.java line 70:
>> 
>>> 68:     public void testIsFinite() {
>>> 69:         for (int i = 0; i < BUFFER_SIZE; i++) {
>>> 70:             outputs[i] = Double.isFinite(inputs[i]) ? false : true;
>> 
>> Any specific reason to explicitly add conditional check to return true/false when isFinite returns bool value ?
>
> Initially, it was returning a boolean value and storing it in the output buffer. Vladimir suggested that the realword usecase of these methods is in conditions. Hence, the benchmarks were modified.

Yes, that makes sense, but being a micro benchmark we micro focusing on perf gain due to this particular API, may be you can have one stand alone case also.

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

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


More information about the hotspot-compiler-dev mailing list