concat vs + vs join (v16)

Revision 16 of this benchmark created on


Description

How to concat strings faster.

Test runner

Ready to run.

Testing in
TestOps/sec
concat
var s = 'Coucou '.concat('c\'est ', 'nous !');
ready
+
var s = 'Coucou ' + 'c\'est ' + 'nous !';
ready
join
var s = ['Coucou ', 'c\'est ', 'nous !'].join();
ready
+=
var s = 'Coucou ';
s += 'c\'est ';
s += 'nous !';
ready

Revisions

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