Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
Firefox 74
Ubuntu
Desktop
4 years ago
Test name Executions per second
`Array.slice(0, N)` 6343167.0 Ops/sec
`Array.length = N` 15360276.0 Ops/sec
`Object.assign([], arr)` with `Array.length = N` 203733.6 Ops/sec
Script Preparation code:
Tests:
  • `Array.slice(0, N)`

  • `Array.length = N`

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