JDK 9 RFC on 6667086: Double.doubleToLongBits(final double value) contains inefficient test for NaN
brian.burkhalter at oracle.com
Thu Jan 16 15:47:20 UTC 2014
Oh I forgot to mention about the optimizations in the comments. I also read about those and was thinking to capture them in a separate issue for clarity.
----- Original Message -----
From: paul.sandoz at oracle.com
Cc: core-libs-dev at openjdk.java.net
Sent: Thursday, January 16, 2014 6:43:47 AM GMT -08:00 US/Canada Pacific
Subject: Re: JDK 9 RFC on 6667086: Double.doubleToLongBits(final double value) contains inefficient test for NaN
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.
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?
More information about the core-libs-dev