RFR: 8348638: Performance regression in Math.tanh [v2]
Jatin Bhateja
jbhateja at openjdk.org
Wed Apr 2 18:31:50 UTC 2025
On Wed, 2 Apr 2025 13:46:47 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Mohamed Issa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change tanh intrinsic endpoint comparison value to match reference OpenJDK implementation
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_tanh.cpp line 331:
>
>> 329: __ andl(rdx, rcx);
>> 330: __ andl(rcx, 32767);
>> 331: __ cmpl(rcx, 16438);
>
> Did you try using "UCOMISD" to directly compare with constant 22.0
[perf_tanh_delimit.txt](https://github.com/user-attachments/files/19573617/perf_tanh_delimit.txt)
Proposed sequence in micro2 shows better path length, please give this a try.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23889#discussion_r2025378258
More information about the hotspot-compiler-dev
mailing list