> 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>
Dhamoder Nalla has updated the pull request incrementally with one additional commit since the last revision: [AArch64] Math.log is 10% slower than StrictMath.log on aarch64 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28306/files - new: https://git.openjdk.org/jdk/pull/28306/files/e8fac776..06b3dd4d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28306&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28306&range=00-01 Stats: 184 lines in 4 files changed: 66 ins; 114 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/28306.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28306/head:pull/28306 PR: https://git.openjdk.org/jdk/pull/28306
