Tests:
  • concat

    x
     
    var params = new Array(1000);
    let other = [];
    for (let x = 0; x < 100; ++x) {
      other = other.concat(params);
    }
    console.log(other);
  • spread push

     
    var params = new Array(1000);
    let other = [];
    for (let x = 0; x < 100; ++x) {
      other.push(...params);
    }
    console.log(other);
  • spread

     
    var params = new Array(1000);
    let other = [];
    for (let x = 0; x < 100; ++x) {
      other = [...other, ...params];
    }
    console.log(other);
  • push single

     
    var params = new Array(1000);
    let other = [];
    for (let x = 0; x < 100; ++x) {
      params.forEach(p => other.push(p));
    }
    console.log(other);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    concat
    spread push
    spread
    push single

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.27 Safari/537.36
Chrome 96 on Linux
View result in a separate tab
Test name Executions per second
concat 167.3 Ops/sec
spread push 1246.2 Ops/sec
spread 65.6 Ops/sec
push single 8641.9 Ops/sec