String concatenation (v64)

Revision 64 of this benchmark created on


Description

Different ways to concatenate strings together

Test runner

Ready to run.

Testing in
TestOps/sec
Direct concatenation
var foo = "abcd" + "efgh" + "ijkl" + "mnop";
ready
Individual += statements
var foo = "abcd";
foo += "efgh";
foo += "ijkl";
foo += "mnop";
ready
Individual statements
var foo = "abcd";
foo = foo + "efgh";
foo = foo + "ijkl";
foo = foo + "mnop";
ready
Using Array#join
var foo = ["abcd", "efgh", "ijkl", "mnop"].join("");
ready
Array join
var b = new Array("abcd", "efgh", "ijkl", "mnop");
b = b.join("")
ready

Revisions

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