!7 static int n = 1000000; p { TreeMap map = litcimap(); repeat n { map.put(randomID(), Bool.TRUE); } repeat 5 { int i = 0; time "Iterating" { for (S key : keys(map)) ++i; } assertEquals(i, n); i = 1; time "Iterating with higherEntry" { S s = map.firstKey(); while ((s = map.higherKey(s)) != null) ++i; } assertEquals(i, n); } }