-
Enhancement
-
Resolution: Duplicate
-
P4
-
9, 10
In:
public static long testLongAcc() {
long acc = 0;
for (int i = 0; i < 1000; i++) {
acc += 8;
}
return acc;
}
C2 doesn't optimize the loop out while in:
public static long testIntAcc() {
int acc = 0;
for (int i = 0; i < 1000; i++) {
acc += 8;
}
return acc;
}
it does
public static long testLongAcc() {
long acc = 0;
for (int i = 0; i < 1000; i++) {
acc += 8;
}
return acc;
}
C2 doesn't optimize the loop out while in:
public static long testIntAcc() {
int acc = 0;
for (int i = 0; i < 1000; i++) {
acc += 8;
}
return acc;
}
it does
- duplicates
-
JDK-8328528 C2 should optimize long-typed parallel iv in an int counted loop
- Resolved
- relates to
-
JDK-8255121 JVM execution time degrades by 50% after 2 iterations
- Open