RFR: 8276673: Optimize abs operations in C2 compiler [v4]

Fei Gao fgao at openjdk.java.net
Wed Dec 15 15:07:40 UTC 2021


On Mon, 13 Dec 2021 08:25:56 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> > The PR optimizes abs operations in the C2 middle end. Can I have your review please?
> 
> So what's the performance data before and after this patch? Does it also benefit on x86?
> 
> It would be better to provide a jmh micro benchmark. Thanks.

Thanks, @DamonFool . Yes, it's supposed to benefit all archs. 
For example, here is the performance data on x86.

Before the patch:
Benchmark                 (seed)   Mode  Cnt       Score       Error   Units
MathBench.absConstantInt       0  thrpt    5  291960.380 ± 10724.572  ops/ms

After the patch:
Benchmark                 (seed)   Mode  Cnt       Score      Error   Units
MathBench.absConstantInt       0  thrpt    5  336271.533 ± 3778.210  ops/ms

The jmh micro benchmark testcase has been added in the latest commit.

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

PR: https://git.openjdk.java.net/jdk/pull/6755


More information about the hotspot-compiler-dev mailing list