Test case name | Result |
---|---|
`Array.slice(0)` | |
`Array.length = N` | |
`Object.assign([], arr)` with `Array.length = N` |
Test name | Executions per second |
---|---|
`Array.slice(0)` | 16813590.0 Ops/sec |
`Array.length = N` | 13203156.0 Ops/sec |
`Object.assign([], arr)` with `Array.length = N` | 24197.7 Ops/sec |