!7 p-exp { new LogNArray a; int n = 1000000; int[] random = new int[n]; for i to n: random[i] = randomInt(); twice { time { for i to n: a.add(random[i]); }} printBenchResult("Adding", n); twice { time { for i to n: a.get(i); }} printBenchResult("Accessing in order", n); twice { time { for i to n: a.get(random[i]); }} printBenchResult("Accessing in random order", n); twice { time { repeat n { a.remove(mod(random[i], l(a))); } }} printBenchResult("Removing", n); }