blob: ad0d4315e97e0f4349afd30f1e9c52835fcf1b25 [file] [log] [blame]
function bar(map) {
for (let [key, value] of map) {
if (value - 1 !== key)
throw new Error("Bad iteration!");
}
}
noInline(bar);
function foo() {
let map = new Map;
for (let i = 0; i < 10000; i++)
map.set(i, i+1);
let start = Date.now();
for (let i = 0; i < 100; i++)
bar(map);
const verbose = false;
if (verbose)
print(Date.now() - start);
}
foo();