Script Preparation code:
AخA
 
const numbers = Array(10).fill(Array.from({ length: 100000 }, (_, i) => i + 1)).flat();
Tests:
  • array.push()

     
    const a = [];
    for (const number of numbers) {
      a.push(number);
    }
  • Set.add()

     
    const s = new Set();
    for (const number of numbers) {
      s.add(number);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array.push()
    Set.add()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
array.push() 190.6 Ops/sec
Set.add() 42.7 Ops/sec