RFR: 8308776: [AArch64] Math.log is 10% slower than StrictMath.log on aarch64 [v2]
Dhamoder Nalla
dhanalla at openjdk.org
Wed Nov 26 00:54:53 UTC 2025
On Tue, 18 Nov 2025 20:55:12 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> Drive-by, cannot promise a full review. But I'm interested ;)
>
> Mostly, I have questions about testing. Are there already tests for accuracy somewhere?
>
> Do you have any benchmark results to support this PR? It would be good if we had a way to prove that performance is good for all sorts of inputs. I suppose we don't have any loops here, so we should just make sure to benchmark cases so that all possible paths of the intrinsic are covered, right?
Thanks @eme64, Updated the PR description with MathBench.logDouble results.
> test/jdk/java/lang/Math/TestLogMonotonicity.java line 61:
>
>> 59: // Powers of two 2^1 .. 2^16
>> 60: for (int i = 1; i <= 16; i++) {
>> 61: list.add(Math.pow(2.0, i));
>
> It seems you now only cover powers of 2, right? Is this sufficient? I don't know what other tests already exist, so maybe this is already covered elsewhere?
Updated the existing LogTests.java with similar monotonicity test in Log1pTests.java.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28306#issuecomment-3578261545
PR Review Comment: https://git.openjdk.org/jdk/pull/28306#discussion_r2562201697
More information about the hotspot-dev
mailing list