mirror of
https://github.com/corda/corda.git
synced 2025-01-06 21:18:46 +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()");
|
traceFunc("testArray()");
|
||||||
Item[] items = new Item[1750];
|
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++) {
|
for (int i=0; i < 1000; i++) {
|
||||||
items[i] = new Item(1);
|
items[i] = new Item(1);
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ public class Memory {
|
|||||||
private static final void testHashMap() {
|
private static final void testHashMap() {
|
||||||
traceFunc("testHashMap()");
|
traceFunc("testHashMap()");
|
||||||
HashMap<Integer, Item> items = new HashMap<Integer, Item>();
|
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++) {
|
for (int i=0; i < 1000; i++) {
|
||||||
items.put(i, new Item(1));
|
items.put(i, new Item(1));
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ public class Memory {
|
|||||||
private static final void testLinkedList() {
|
private static final void testLinkedList() {
|
||||||
traceFunc("testLinkedList()");
|
traceFunc("testLinkedList()");
|
||||||
LinkedList<Item> items = new LinkedList<Item>();
|
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++) {
|
for (int i=0; i < 1000; i++) {
|
||||||
items.add(new Item(1));
|
items.add(new Item(1));
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ public class Memory {
|
|||||||
return r;
|
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++) {
|
for (int i=0; i < 1000; i++) {
|
||||||
items.add(new Item(1));
|
items.add(new Item(1));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user