Script Preparation code:
AخA
 
var list = Array.from({ length: 1000 }).map((_, i) => `Item ${i + 1}`);
Tests:
  • A: push

     
    var newList = [];
    list.forEach(item => newList.push(item));
  • B: Spread

     
    var newList = [];
    list.forEach(item => newList = [ ...newList, item ]);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    A: push
    B: Spread

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
A: push 119916.5 Ops/sec
B: Spread 3000.5 Ops/sec