Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Chrome 53
Windows
Other
8 years ago
Test name Executions per second
Array constructor - 100000 items 2800.9 Ops/sec
Array literal - 100000 items 2165.4 Ops/sec
Array literal (assign by index) - 100000 items 2839.8 Ops/sec
Array literal (explicit length) - 100000 items 13518.8 Ops/sec
Array constructor (no new) - 100000 items 2888.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