RFR: 6506405: Math.abs(float) is slow

Brian Burkhalter bpb at openjdk.java.net
Wed Jul 7 20:36:01 UTC 2021


On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Please consider this change to make the `float` and `double` versions of `java.lang.Math.abs()` branch-free.

With this change there is no measurable effect on performance on macOS, but on Linux there is approximately a 10% throughput improvement.

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

PR: https://git.openjdk.java.net/jdk/pull/4711


More information about the core-libs-dev mailing list