concat vs + vs join (v13)

Revision 13 of this benchmark created on


Description

How to concat strings faster.

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
+= operator
var foo = 'Coucou';
foo += 'c\'est';
foo += 'nous !';
ready

Revisions

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