String concat (v3)

Revision 3 of this benchmark created by Jeff on


Setup

var string = '',
      x = 'salam',
      y = 'chetori',
      z = 'khubam';

Test runner

Ready to run.

Testing in
TestOps/sec
+
string = string + x + y + z;
ready
+=
string += x + y + z;
ready
direct assign
string = x + y + z;
ready
Array.prototype.join
string = [string, x, y, z].join('');
ready

Revisions

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