-
Enhancement
-
Resolution: Unresolved
-
P4
-
9, 10
-
Cause Known
-
x86
-
generic
Math.min/max intrinsic unconditionally generates cmove instructions on x86 which may perform much worse than branch depending on probability of branches.
We have code in PhaseIdealLoop::conditional_move() which takes into account branch's probability.
I suggest to not use LibraryCallKit::inline_min_max() on CPUs which have good predictors (modern x86).
We have code in PhaseIdealLoop::conditional_move() which takes into account branch's probability.
I suggest to not use LibraryCallKit::inline_min_max() on CPUs which have good predictors (modern x86).
- duplicates
-
JDK-8146071 Math.max in unrolled loops may produce less optimal code than explicit comparison
-
- Closed
-
- relates to
-
JDK-8034833 Strange performance behaviour of cmov vs branch on x86
-
- Open
-
-
JDK-8324655 Identify integer minimum and maximum patterns created with if statements
-
- Resolved
-