Test name | Executions per second |
---|---|
For + Push | 201.0 Ops/sec |
Map | 4949.0 Ops/sec |
var arr = Array.from(new Array(10000)).map((_, index) => index);
var result = [];
for (let i = 0; i < arr.length; i++) {
result.push(arr[i])
}
result = arr.map((a) => a)