Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
Firefox 87
Ubuntu
Desktop
3 years ago
Test name Executions per second
`Array.slice(0, N)` 5601112.0 Ops/sec
`Array.length = N` 23441062.0 Ops/sec
`Object.assign([], arr)` with `Array.length = N` 271138.7 Ops/sec
Script Preparation code:
Tests:
  • `Array.slice(0, N)`

  • `Array.length = N`

  • `Object.assign([], arr)` with `Array.length = N`