minor refactor
This commit is contained in:
parent
d8da2ef883
commit
627a493f8f
|
@ -23,18 +23,15 @@ public class ArraySortBenchmark {
|
||||||
int iterations = 1000;
|
int iterations = 1000;
|
||||||
|
|
||||||
int[] array = new int[iterations];
|
int[] array = new int[iterations];
|
||||||
|
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<>();
|
||||||
|
|
||||||
@Setup(Level.Trial)
|
@Setup(Level.Trial)
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
|
|
||||||
for (int i = 0; i < iterations; i++) {
|
for (int i = 0; i < iterations; i++) {
|
||||||
array[i] = i;
|
array[i] = i;
|
||||||
list.add(i);
|
list.add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Benchmark
|
@Benchmark
|
||||||
|
|
Loading…
Reference in New Issue