avoid dead code elimination
This commit is contained in:
parent
79795d242d
commit
8d45e3e28f
1 changed files with 3 additions and 3 deletions
|
|
@ -108,10 +108,10 @@ public class JmhBenchmark {
|
||||||
|
|
||||||
@Benchmark
|
@Benchmark
|
||||||
public int seqMultArrayGetLRTD(State state) {
|
public int seqMultArrayGetLRTD(State state) {
|
||||||
int t = 0xFFFFFFFF;
|
int t = 0;
|
||||||
for (int c = 0; c < COLS; c++) {
|
for (int c = 0; c < COLS; c++) {
|
||||||
for (int r = 0; r < ROWS; r++) {
|
for (int r = 0; r < ROWS; r++) {
|
||||||
t = state.intArray.get(r, c);
|
t += state.intArray.get(r, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
|
|
@ -122,7 +122,7 @@ public class JmhBenchmark {
|
||||||
int t = 0;
|
int t = 0;
|
||||||
for (int r = 0; r < ROWS; r++) {
|
for (int r = 0; r < ROWS; r++) {
|
||||||
for (int c = 0; c < COLS; c++) {
|
for (int c = 0; c < COLS; c++) {
|
||||||
t = state.intArray.get(r, c);
|
t += state.intArray.get(r, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue