RFR: 8338694: x86_64 intrinsic for tanh using libm

Jatin Bhateja jbhateja at openjdk.org
Tue Aug 27 11:13:09 UTC 2024


On Wed, 21 Aug 2024 00:25:03 GMT, Srinivas Vamsi Parasa <duke 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

Hi @vamsi-parasa ,  Kindly also add a JMH micro benchmark, I did a first run and see around 4% performance drop with attached micro on Sapphire Rapids.
[test.txt](https://github.com/user-attachments/files/16761142/test.txt)

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

PR Comment: https://git.openjdk.org/jdk/pull/20657#issuecomment-2312254535


More information about the core-libs-dev mailing list