concat vs + vs join (v4)

Revision 4 of this benchmark created by Wei on


Setup

var coucou = 'Coucou ';

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
+=
coucou += 'c\'est ' + 'nous !';
ready
= then +
coucou = coucou + 'c\'est ' + 'nous !';
ready

Revisions

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