Java 8 RFR 8010430: Math.round has surprising behavior for odd values of ulp 1

Brian Burkhalter brian.burkhalter at oracle.com
Mon Aug 26 23:19:52 UTC 2013


On Aug 26, 2013, at 7:52 AM, Guy Steele wrote:

> On Aug 24, 2013, at 3:02 PM, Jeff Hain <jeffhain at rocketmail.com> wrote:
> 
>> 
>> Dmitry Nadezhin wrote:
>>> Nevertheless, I send this variant now in hope that it may be useful.
>> 
>> Great! It's much faster than what I proposed, cleaner (only integers),
>> and according to my tests it behaves the same.
> 
> Excellent!  Nice piece of work---thanks, Dmitry.

Indeed - thanks, Dmitry! That is much better than what I proposed.

I did a quick and dirty JMH test with this code and it looks to be more than 6% faster for double and more than 24% faster for float versus the current codebase. The speed up is probably more than these values which should be considered lower bounds on speed improvement.

I have updated the webrev accordingly:

http://cr.openjdk.java.net/~bpb/8010430/

Approval by a Reviewer of this patch is still needed.

Thanks,

Brian


More information about the core-libs-dev mailing list