Test name | Executions per second |
---|---|
for | 69507.0 Ops/sec |
for of | 59764.8 Ops/sec |
for in | 4721.5 Ops/sec |
const arr = Array(10000).fill(0);
const l = arr.length;
for (let i = 0; i < l; i++) {
arr[i];
}
const arr = Array(10000).fill(0);
for (let x of arr) {
x;
}
const arr = Array(10000).fill(0);
for (let i in arr) {
arr[i];
}