Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0
Firefox 109
Ubuntu
Desktop
one year ago
Test name Executions per second
`Array.slice(0, N)` 14111313.0 Ops/sec
`Array.length = N` 24842776.0 Ops/sec
`Object.assign([], arr)` with `Array.length = N` 416806.7 Ops/sec
Script Preparation code:
Tests:
  • `Array.slice(0, N)`

  • `Array.length = N`

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