RFR: 8281518: New optimization: convert "(x|y)-(x^y)" into "x&y" [v2]
Zhiqiang Zang
duke at openjdk.java.net
Wed Feb 9 20:18:07 UTC 2022
On Wed, 9 Feb 2022 16:21:16 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
> For any app there are probably going to be a lot of times where the compiler matches subtract nodes. There are probably going to be very few cases where this pattern will turn up -- even if you include cases where it happens through recursive reduction -- and even less where the resulting generated code gets executed many times. At some point we need to trade off the compiler overhead for all applications against the potential gains for some applications. The micro-benchmark only addresses one side of that trade-off.
Thanks for your input. I totally agree JIT cares compilation overhead way more than those static compilers, but I was wondering if there is a good way to benchmark the general cases where this pattern is few seen. I know there are some benckmark suites for Java such as specjvm or renaissance but I don't think they are a good fit here. What I wanted to ask is what is an objective metric in the community to decide if we should adopt a new optimization, if there is one.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7395
More information about the hotspot-compiler-dev
mailing list