Test name | Executions per second |
---|---|
for-of | 144.7 Ops/sec |
for-index | 756.7 Ops/sec |
const planes = new Array(1_000_000).fill(2);
for (const plane of planes) {
Math.sqrt(plane);
}
for (let i = 0; i < planes.length; i++) {
const plane = planes[i];
Math.sqrt(plane);
}