RFR: 8338694: x86_64 intrinsic for tanh using libm [v13]
Yudi Zheng
yzheng at openjdk.org
Wed Oct 16 15:15:26 UTC 2024
On Mon, 23 Sep 2024 19:24:51 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
>> The goal of this PR is to implement an x86_64 intrinsic for java.lang.Math.tanh() using libm
>>
>> Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup
>> -- | -- | -- | --
>> MathBench.tanhDouble | 70900 | 95618 | 1.35x
>
> Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
>
> change ifdef from x86 to AMD64
src/hotspot/cpu/x86/stubGenerator_x86_64_tanh.cpp line 74:
> 72: // Special cases:
> 73: // tanh(NaN) = quiet NaN, and raise invalid exception
> 74: // tanh(INF) = that INF
This should be
tanh(POSITIVE_INFINITY) = +1.0
tanh(NEGATIVE_INFINITY) = -1.0
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20657#discussion_r1803316120
More information about the hotspot-dev
mailing list