Skip to content

Commit bbae5ed

Browse files
committed
compiler: rename ArrayDuplicationBenchmark#targetArray
1 parent 41a90e9 commit bbae5ed

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

compiler/src/org.graalvm.micro.benchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class ArrayDuplicationBenchmark extends BenchmarkBase {
4646

4747
private Object[][] testObjectArrayOfStrings;
4848

49-
private Object[] dummy;
49+
private Object[] targetArray;
5050

5151
@Setup
5252
public void setup() {
@@ -65,22 +65,22 @@ public void setup() {
6565

6666
@Setup(Level.Iteration)
6767
public void iterationSetup() {
68-
dummy = new Object[TESTSIZE * 3];
68+
targetArray = new Object[TESTSIZE * 3];
6969
}
7070

7171
@TearDown(Level.Iteration)
7272
public void iterationTearDown() {
73-
dummy = null;
73+
targetArray = null;
7474
}
7575

7676
@Benchmark
7777
@OperationsPerInvocation(TESTSIZE)
7878
public Object[] normalArraycopy() {
7979
int j = 0;
8080
for (int i = 0; i < TESTSIZE; i++) {
81-
dummy[j++] = normalArraycopy(testObjectArray[i]);
81+
targetArray[j++] = normalArraycopy(testObjectArray[i]);
8282
}
83-
return dummy;
83+
return targetArray;
8484
}
8585

8686
public Object[] normalArraycopy(Object[] cache) {
@@ -94,9 +94,9 @@ public Object[] normalArraycopy(Object[] cache) {
9494
public Object[] arraysCopyOf() {
9595
int j = 0;
9696
for (int i = 0; i < TESTSIZE; i++) {
97-
dummy[j++] = arraysCopyOf(testObjectArray[i]);
97+
targetArray[j++] = arraysCopyOf(testObjectArray[i]);
9898
}
99-
return dummy;
99+
return targetArray;
100100
}
101101

102102
public Object[] arraysCopyOf(Object[] cache) {
@@ -108,19 +108,19 @@ public Object[] arraysCopyOf(Object[] cache) {
108108
public Object[] arraysCopyOfToString() {
109109
int j = 0;
110110
for (int i = 0; i < TESTSIZE; i++) {
111-
dummy[j++] = arraysCopyOfToString(testStringArray[i]);
111+
targetArray[j++] = arraysCopyOfToString(testStringArray[i]);
112112
}
113-
return dummy;
113+
return targetArray;
114114
}
115115

116116
@Benchmark
117117
@OperationsPerInvocation(TESTSIZE)
118118
public Object[] arraysCopyOfToStringFromObjectArray() {
119119
int j = 0;
120120
for (int i = 0; i < TESTSIZE; i++) {
121-
dummy[j++] = arraysCopyOfToString(testObjectArrayOfStrings[i]);
121+
targetArray[j++] = arraysCopyOfToString(testObjectArrayOfStrings[i]);
122122
}
123-
return dummy;
123+
return targetArray;
124124
}
125125

126126
public Object[] arraysCopyOfToString(Object[] cache) {
@@ -132,9 +132,9 @@ public Object[] arraysCopyOfToString(Object[] cache) {
132132
public Object[] cloneObjectArray() {
133133
int j = 0;
134134
for (int i = 0; i < TESTSIZE; i++) {
135-
dummy[j++] = arraysClone(testObjectArray[i]);
135+
targetArray[j++] = arraysClone(testObjectArray[i]);
136136
}
137-
return dummy;
137+
return targetArray;
138138
}
139139

140140
@SuppressWarnings("cast")

0 commit comments

Comments
 (0)