Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Linux
Desktop
one year ago
Test name Executions per second
new Array() 817534.1 Ops/sec
Array.from() 31202.9 Ops/sec
Tests:
  • new Array()

    AخA
     
    new Array(500).fill(0, 0, 500)
  • Array.from()

     
    Array.from({ length: 500 }, () => 0)