Tests:
  • array.push

    x
     
    const array = [];
    const n = 100000;
    for (let i = 0; i < n; i++) {
        array.push('#123456');
    }
  • array.fill

     
    const n = 100000;
    const array = Array(n).fill('#123456');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array.push
    array.fill

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 16 days ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Linux
View result in a separate tab
Test name Executions per second
array.push 1892.8 Ops/sec
array.fill 4278.5 Ops/sec