RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]
Per Minborg
pminborg at openjdk.org
Mon Sep 30 06:15:38 UTC 2024
On Fri, 27 Sep 2024 17:42:25 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > The only situation where this PR is a regression compared to current code is when the one of the branch side is always taken.
>
> Bear in mind that's quite common. It's not very unusual to clip a range with something equivalent to `x = min(max(x, lowest), highest)`. What does benchmarking that look like, when all the `x` are within that range?
In fact, the new `Math::clamp` methods do just this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20098#issuecomment-2382197333
More information about the core-libs-dev
mailing list