Script Preparation code:
AخA
 
var str = '';
var strArr = new Array(10000);
Tests:
  • String concatenation

     
    for (let i = 0; i < 10000; i++) {
      str += 'new string';
    }
  • String array

     
    for (let i = 0; i < 10000; i++) {
      strArr[i] = 'new string';
    }
    strArr.join();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    String concatenation
    String array

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.167 YaBrowser/22.7.3.822 Yowser/2.5 Safari/537.36
Yandex Browser 22 on Windows
View result in a separate tab
Test name Executions per second
String concatenation 342.3 Ops/sec
String array 759.2 Ops/sec