concat strings with arrays

JavaScript performance comparison

Revision 2 of this test case created by

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
In line concating
var string = "a" + " b" + " c";
pending…
Multiple line concatin
var string = "";
string += "a";
string += " b";
string += " c";
pending…
Array Concating Multiple Lines
var string = [];
string.push("a");
string.push("b");
string.push("c");
string = string.join(" ");
pending…
Array Concating prevent multiple spaces
var string = [];
string.push("a");
string.push(" b");
string.push(" c");
string = string.join(" ").replace(/\ {2,}/g, " ");
pending…
Litereal array Concating
var string = ["a", "b", "c"]
string = string.join(" ");
pending…
Multiple line concat backward
var string = "";
string = string + "c";
string = string + "b ";
string = string + "a ";
pending…

Compare results of other browsers

Revisions

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

0 Comments