Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Linux
Desktop
11 months ago
Test name Executions per second
Array constructor - 10_000 items 67335.6 Ops/sec
Array literal - 10_000 items 36783.3 Ops/sec
Array literal (assign by index) - 10_000 items 31192.0 Ops/sec
Array literal (explicit length) - 10 items 71399.7 Ops/sec
Tests:
  • Array constructor - 10_000 items

  • Array literal - 10_000 items

  • Array literal (assign by index) - 10_000 items

  • Array literal (explicit length) - 10 items