Test name | Executions per second |
---|---|
for | 10.0 Ops/sec |
foreach | 451.0 Ops/sec |
some | 309.2 Ops/sec |
for..of | 14.5 Ops/sec |
var array = new Array(1714176);
for (var i = 0; i < array.length; i++) {
array[i];
}
array.forEach(function(i) {
array[i];
});
array.some(function(i) {
array[i];
});
for (var i of array) {
array[i];
}