RFR: 8305783: x86_64: Optimize AbsI and AbsL
Quan Anh Mai
qamai at openjdk.org
Sun Apr 9 09:48:49 UTC 2023
On Sun, 9 Apr 2023 09:41:08 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Hi,
>
> This patch optimizes the sequence emitted by `AbsINode` and `AbsLNode` to save some instructions and 1 temp register. Please take a look and kindly leave your reviews.
>
> Thanks a lot.
Running the patch on `org.openjdk.bench.java.lang.MathBench` shows noticeable improvement:
Before After
Benchmark Mode Cnt Score Error Score Error Units Change
MathBench.absInt thrpt 8 2848176.368 ± 18552.810 3442310.540 ± 65838.237 ops/ms +20.86%
MathBench.absLong thrpt 8 2851886.891 ± 17565.736 3389983.543 ± 36466.553 ops/ms +18.87%
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13402#issuecomment-1501088764
More information about the hotspot-compiler-dev
mailing list