mirror of
https://github.com/corda/corda.git
synced 2025-01-04 20:24:17 +00:00
fix loops to interate ITERATION_COUNT times instead of ITERATION_COUNT - 1
This commit is contained in:
parent
c3300948bf
commit
dbf398e6d0
@ -46,7 +46,7 @@ public class Memory {
|
||||
traceFunc("testArray()");
|
||||
Item[] items = new Item[1750];
|
||||
|
||||
for (int iter=1; iter < ITERATION_COUNT; iter++) {
|
||||
for (int iter=0; iter < ITERATION_COUNT; iter++) {
|
||||
for (int i=0; i < 1000; i++) {
|
||||
items[i] = new Item(1);
|
||||
}
|
||||
@ -84,7 +84,7 @@ public class Memory {
|
||||
private static final void testHashMap() {
|
||||
traceFunc("testHashMap()");
|
||||
HashMap<Integer, Item> items = new HashMap<Integer, Item>();
|
||||
for (int iter=1; iter < ITERATION_COUNT; iter++) {
|
||||
for (int iter=0; iter < ITERATION_COUNT; iter++) {
|
||||
for (int i=0; i < 1000; i++) {
|
||||
items.put(i, new Item(1));
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class Memory {
|
||||
private static final void testLinkedList() {
|
||||
traceFunc("testLinkedList()");
|
||||
LinkedList<Item> items = new LinkedList<Item>();
|
||||
for (int iter=1; iter < ITERATION_COUNT; iter++) {
|
||||
for (int iter=0; iter < ITERATION_COUNT; iter++) {
|
||||
for (int i=0; i < 1000; i++) {
|
||||
items.add(new Item(1));
|
||||
}
|
||||
@ -144,7 +144,7 @@ public class Memory {
|
||||
return r;
|
||||
}
|
||||
});
|
||||
for (int iter=1; iter < ITERATION_COUNT; iter++) {
|
||||
for (int iter=0; iter < ITERATION_COUNT; iter++) {
|
||||
for (int i=0; i < 1000; i++) {
|
||||
items.add(new Item(1));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user