Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3452.0 Safari/537.36
Chrome 69
Linux
Desktop
6 years ago
Test name Executions per second
concat() 3133.2 Ops/sec
plus_operator 3150.4 Ops/sec
plus_eq_operator 1348.5 Ops/sec
Script Preparation code:
AخA
 
var string1 = "Hello ";
var string2 = " world!";
Tests:
  • concat()

     
    for(i = 0; i < 1000; i++) {
      var message = string1.concat(string2);
    }
  • plus_operator

     
    for(i = 0; i < 1000; i++) {
      var message = string1 + string2;
    }
  • plus_eq_operator

     
    for(i = 0; i < 1000; i++) {
      string1 += string2;
    }