concat vs + vs join vs push (v20)

Revision 20 of this benchmark created by JulienW 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
String concat
String.prototype.concat('Coucou ', 'c\'est ', 'nous !')
ready

Revisions

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