concat vs + vs join (v41)

Revision 41 of this benchmark created by Bergi on


Description

How to concat strings faster.

Setup

var arr = ['Coucou ', 'c\'est ', 'nous !'];

Test runner

Ready to run.

Testing in
TestOps/sec
concat
''.concat.apply('', arr);
ready
+
arr[0] + arr[1] + arr[2];
ready
join
arr.join();
ready

Revisions

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