Tests:
  • new Array()

  • Array.from()

  • [] + length

  • [] + fill undefined

  • [] + fill void

  • new Array() zeroed

  • Array.from zeroes

  • [] + fill zeroes

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    new Array()
    Array.from()
    [] + length
    [] + fill undefined
    [] + fill void
    new Array() zeroed
    Array.from zeroes
    [] + fill zeroes

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
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 on Windows
View result in a separate tab
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