concat vs + vs join (v10)

Revision 10 of this benchmark created on


Setup

var s1='Coucou ', s2='c\'est ', s3='nous !', t='';

Teardown



            t='';
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
concat
t.concat(s1, s2, s3);
ready
+
t = s1 + s2 + s3;
ready
join
t = [s1, s2, s3].join();
ready
+=
t += s1;
t += s2;
t += s3;
ready
= t + (x)
t = t + s1;
t = t + s2;
t = t + s3;
ready

Revisions

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