concat vs + vs join (v37)

Revision 37 of this benchmark created on


Setup

var c1 = 'Coucou ';
  var c2 = 'c\'est ';
  var c3 = 'nous !';

Test runner

Ready to run.

Testing in
TestOps/sec
concat
'Coucou '.concat('c\'est ', 'nous !');
ready
+
'Coucou ' + 'c\'est ' + 'nous !';
ready
join
['Coucou ', 'c\'est ', 'nous !'].join();
ready
concat vars
c1.concat( c2, c3 );
ready
+ vars
c1 + c2 + c3;
ready
join vars
[c1, c2, c3].join();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.