On Thu, 13 Nov 2025 20:41:56 GMT, Dhamoder Nalla <[email protected]> wrote:

> This PR Introduces an optimized AArch64 intrinsic for Math.log using 
> reciprocal refinement and a table-driven polynomial.
> Improves throughput for double logarithms while preserving IEEE-754 corner 
> case behavior (±0, subnormals, negatives, NaN).
> 
> 
> 
> The micro-benchmark results from MathBench and StrictMathBench below show the 
> performance improvement of Math.log:
> 
> 
> **Before change**
> <html xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
> xmlns="http://www.w3.org/TR/REC-html40";>
> 
> <head>
> 
> <meta name=ProgId content=OneNote.File>
> <meta name=Generator content="Microsoft OneNote 15">
> </head>
> 
> <body lang=en-US style='font-family:Calibri;font-size:11.0pt'>
> 
> 
> <div style='direction:ltr;border-width:100%'>
> 
> <div style='direction:ltr;margin-top:0in;margin-left:0in;width:12.9277in'>
> 
> <div style='direction:ltr;margin-top:0in;margin-left:0in;width:12.9277in'>
> 
> <div style='direction:ltr'>
> 
> Benchmark | Mode | Cnt | Score | Error | Units
> -- | -- | -- | -- | -- | --
> MathBench.logDouble | thrpt | 10 | **15549.705** | ±357.439 | ops/ms
> StrictMathBench.logDouble | thrpt | 10 | 219408.158 | ±16484.680 | ops/ms
> 
> </div>
> 
> </div>
> 
> </div>
> 
> </div>
> 
> 
> </body>
> 
> </html>
> 
> 
> 
> **After adding Math.log intrinsic**
> 
> <html xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
> xmlns="http://www.w3.org/TR/REC-html40";>
> 
> <head>
> 
> <meta name=ProgId content=OneNote.File>
> <meta name=Generator content="Microsoft OneNote 15">
> </head>
> 
> <body lang=en-US style='font-family:Calibri;font-size:11.0pt'>
> 
> 
> <div style='direction:ltr;border-width:100%'>
> 
> <div style='direction:ltr;margin-top:0in;margin-left:0in;width:12.9277in'>
> 
> <div style='direction:ltr;margin-top:0in;margin-left:0in;width:12.9277in'>
> 
> <div style='direction:ltr'>
> 
> Benchmark | Mode | Cnt | Score | Error | Units
> -- | -- | -- | -- | -- | --
> MathBench.logDouble | thrpt | 10 | **300086.773** | ±6675.936 | ops/ms
> StrictMathBench.logDouble | thrpt | 10 | 226521.817 | ±4038.975 | ops/ms
> 
> 
> </div>
> 
> </div>
> 
> </div>
> 
> </div>
> 
> 
> </body>
> 
> </html>

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/28306

Reply via email to