blob: 32f1f4fdd80f5f8efcf09610df835ccfc1ee547d [file] [log] [blame]
function bar(map, p) {
return map.get(p) + map.get(p);
}
noInline(bar);
function foo() {
let map = new Map;
let items = [
[10, 50],
["450", 78],
[{}, {}],
[Symbol(), true],
[undefined, null],
[true, null],
[false, true],
[45.87, {}]
];
for (let [key, value] of items)
map.set(key, value);
let start = Date.now();
for (let i = 0; i < 5000000; i++)
bar(map, items[i % items.length][0]);
const verbose = false;
if (verbose)
print(Date.now() - start);
}
foo();