JDK 9 RFC on 6667086: Double.doubleToLongBits(final double value) contains inefficient test for NaN
Paul Sandoz
paul.sandoz at oracle.com
Thu Jan 16 14:42:23 UTC 2014
On Jan 15, 2014, at 10:28 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> Issue: https://bugs.openjdk.java.net/browse/JDK-6667086
> Webrev: http://cr.openjdk.java.net/~bpb/6667086/webrev/
>
> According to micro-benckmarks, there is no statistically significant performance change due to applying this patch but the code definitely looks cleaner.
>
Looks OK.
I would hope at least the generated machine code from your updated method would be simpler.
In a comment of the bug there are some optimizations proposed to other methods (Math.nextAfter/nextUp), might be useful to fix those too or capture in another bug if the intention is to evaluate?
Paul.
More information about the core-libs-dev
mailing list