String concat versus array join (v5)

Revision 5 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array join
var s = ["<div>", "<div>", "<div>", "<div>", "string"];

for(var i=0; i < 500; i++){
s.push("hello there friend");
}

s.join("");
ready
String concat
var s = ("<div>" + "<div>" + "<div>" + "<div>" + "string");

for(var i=0; i < 500; i++){
s +=  "hello there friend";
}
ready

Revisions

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