Tests:
  • Array.from() only

  • Array.from().map()

  • .fill("").map()

  • .fill(null).map()

  • .fill(undefined).map()

  • .fill(true).map()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array.from() only
    Array.from().map()
    .fill("").map()
    .fill(null).map()
    .fill(undefined).map()
    .fill(true).map()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Array.from() only 344792.5 Ops/sec
Array.from().map() 380070.2 Ops/sec
.fill("").map() 2800939.2 Ops/sec
.fill(null).map() 2778600.2 Ops/sec
.fill(undefined).map() 2792707.8 Ops/sec
.fill(true).map() 2847709.8 Ops/sec


;