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 8208.4 Ops/sec
Array literal - 100000 items 1494.5 Ops/sec
Array literal (assign by index) - 100000 items 1834.3 Ops/sec
Array literal (explicit length) - 100000 items 2410.8 Ops/sec
Array constructor (no new) - 100000 items 8340.7 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