concat vs + vs join (v42)

Revision 42 of this benchmark created by t on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
'Coucou '.concat('c\'est ', 'nous !');
ready
+
var str = null;
var first = null;
var second = "asf";
var third = null;
if(first!=null)
 str += first;
if(second!=null)
 str += second;
if(third!=null)
 str += third;
ready
join
['Coucou ', 'c\'est ', 'nous !'].join();
ready

Revisions

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