JDK 9 RFR of 4477961: java.lang.Math.toDegrees(double) could be optimized
brian.burkhalter at oracle.com
Mon Sep 22 21:48:56 UTC 2014
On Sep 22, 2014, at 2:43 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> I would probably just go and declare the private compile-time constants.
> This is safer, since: a) you are not at the mercy of optimizing compiler
> anymore (have you tried the benchmark with C1?); b) the initializing
> expressions are FP-strict, less opportunity for hard to diagnose numeric
I actually tested with compile-time constants and the result was the same as for what I posted. Your suggestion is a good one however so I will update and repost.
More information about the core-libs-dev