Run details:
Mozilla/5.0 (iPad; CPU OS 10_0_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A403 Safari/602.1
Mobile Safari 10
iOS 10.0.1
iPad
8 years ago
Test name Executions per second
Array constructor - 100000 items 8082.2 Ops/sec
Array literal - 100000 items 1383.4 Ops/sec
Array literal (assign by index) - 100000 items 1567.0 Ops/sec
Array literal (explicit length) - 100000 items 2509.6 Ops/sec
Array constructor (no new) - 100000 items 8113.4 Ops/sec
Tests:
  • Array constructor - 100000 items

  • Array literal - 100000 items

  • Array literal (assign by index) - 100000 items

  • Array literal (explicit length) - 100000 items

  • Array constructor (no new) - 100000 items