RFR: 8370150: Add StrictMath microbenchmarks to cover FDLIBM algorithms [v2]

Raffaello Giulietti rgiulietti at openjdk.org
Mon Oct 20 14:59:13 UTC 2025


On Fri, 17 Oct 2025 22:47:21 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:

>> Add StrictMath microbenchmarks to cover FDLIBM algorithms
>> 
>> The methods that require fdlibm semantics are sin, cos, tan, asin, acos, atan, exp, log, log10, cbrt, atan2, pow, sinh, cosh, tanh, hypot, expm1, and log1p.
>
> Sergey Kuksenko has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update StrictMathExtraBench.java
>   
>   Fix copyright format

test/micro/org/openjdk/bench/java/lang/StrictMathExtraBench.java line 51:

> 49:             this.min = min;
> 50:             this.max = max;
> 51:             this.signed = signed;

This field is never read.
I guess you want to change the `setup()` method to use this field rather than rely on `nextBoolean()`?

test/micro/org/openjdk/bench/java/lang/StrictMathExtraBench.java line 626:

> 624:     public static class RangeHalfLn2To56Ln2 extends RangeState {
> 625:         public RangeHalfLn2To56Ln2() {
> 626:             super(0.34657359, 38.8162421);

Please consider declaring "magic" values related to ln(2) as `private static final double`s

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27881#discussion_r2445241030
PR Review Comment: https://git.openjdk.org/jdk/pull/27881#discussion_r2445271711


More information about the core-libs-dev mailing list