blob: b459852d75e22b6c7d29a76262a27904692a6fd0 [file] [log] [blame]
var globalSum = 0;
(function () {
function createMap(count) {
var map = new Map;
for (var i = 0; i < count; i++) {
map.set(i, i);
}
return map;
}
var COUNT = 2000;
var map = createMap(COUNT);
var sum = 0;
for (var i = 0; i < 1e2; ++i) {
sum = 0;
map.forEach(function (value, key) {
sum += key;
});
globalSum = sum;
}
return sum;
}());