Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36
Chrome 67
Linux
Desktop
6 years ago
Test name Executions per second
concat() 5030.9 Ops/sec
plus_operator 5223.0 Ops/sec
plus_eq_operator 2089.6 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;
    }