RFR: 8302191: Performance degradation for float/double modulo on Linux [v5]

Jan Kratochvil duke at openjdk.org
Fri Mar 3 11:46:16 UTC 2023


On Thu, 2 Mar 2023 22:27:45 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix copyright author.
>
> test/micro/org/openjdk/bench/vm/floatingpoint/DremFrem.java line 174:
> 
>> 172:             double inf_minus_inf  = Double.POSITIVE_INFINITY - Double.POSITIVE_INFINITY;
>> 173:             double inf_times_zero = Double.POSITIVE_INFINITY * 0.0f;
>> 174:             double quiet_nan1     = Double.longBitsToDouble(0x7ffc000000000001l);
> 
> Nit: whether or not a particular NaN bit pattern is quiet or signalling is an architecture-specific determination, it is not specified by the IEEE 754 standard.

First I disagree:
- [it makes formal recommendations for the encoding of the signaling/quiet NaN state.](https://en.wikipedia.org/wiki/IEEE_754-2008_revision#Clause_6:_Infinity,_NaNs,_and_sign_bit)
- [A signaling NaN bit string should be encoded with the first bit of the trailing significand field being 0](https://irem.univ-reunion.fr/IMG/pdf/ieee-754-2008.pdf#page=47)

Second the testcase tests just compatibility as AFAIK Java does not support the signaling.

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

PR: https://git.openjdk.org/jdk/pull/12508


More information about the hotspot-dev mailing list