Tests:
  • array concat

    x
     
    let text = [];
    for (i = 10000; i > 0; i--) {
        text[i] = "some text";
    }
    const val = text.join(" ");
  • array push

     
    var text = [];
    for (i = 10000; i > 0; i--) {
        text.push('some text');
    }
    var val = text.join(" ");
  • concat

     
    var text = '';
    for (i = 10000; i > 0; i--) {
        text += ` some text`;
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array concat
    array push
    concat

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
array concat 4304.5 Ops/sec
array push 8859.6 Ops/sec
concat 21466.9 Ops/sec