Run details:
Mozilla/5.0 (X11; CrOS x86_64 14816.131.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Chrome OS 14816.131.0
Desktop
one year ago
Test name Executions per second
`Array.slice(0, N)` 1675997.9 Ops/sec
`Array.length = N` 1586541.6 Ops/sec
`Object.assign([], arr)` with `Array.length = N` 48221.5 Ops/sec
Script Preparation code:
Tests:
  • `Array.slice(0, N)`

  • `Array.length = N`

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