Script Preparation code:
AخA
 
var str = "";
var i;
var sArr = [];
Tests:
  • String concatentation

     
    for (i = 1000; i > 0; i--) {
        str += "String concatenation. ";
    }
  • Array join

     
    for (i = 1000; i > 0; i--) {
        sArr[i] = "String concatenation. ";
    }
    str = sArr.join("");
  • Array join (w/ push)

     
    for (i = 1000; i > 0; i--) {
        sArr.push("String concatenation. ");
    }
    str = sArr.join("");
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    String concatentation
    Array join
    Array join (w/ push)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
String concatentation 3543.2 Ops/sec
Array join 11442.0 Ops/sec
Array join (w/ push) 109.8 Ops/sec