String concat (v12)

Revision 12 of this benchmark created by joe on


Setup

var string = '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
String.prototype.concat
string.concat(x, y, z);
ready
Array.prototype.join
string = [string, x, y, z].join('');
ready
+= 2
string += x;
string += y;
string += z;
ready

Revisions

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