Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
new Array() 3596301.0 Ops/sec
Array.from() 52363.2 Ops/sec
[] + length 4487997.0 Ops/sec
[] + fill undefined 8923331.0 Ops/sec
[] + fill void 44257096.0 Ops/sec
new Array() zeroed 8672663.0 Ops/sec
Array.from zeroes 47012.9 Ops/sec
[] + fill zeroes 45921904.0 Ops/sec
Tests:
  • new Array()

  • Array.from()

  • [] + length

  • [] + fill undefined

  • [] + fill void

  • new Array() zeroed

  • Array.from zeroes

  • [] + fill zeroes


;