String concat versus array join

Benchmark created by Jonathan Perry on


Test runner

Ready to run.

Testing in
TestOps/sec
String concat
var s = ("<div>" + "<div>" + "<div>" + "<div>" + "string" + "<\/div>" + "<\/div>" + "<\/div>" + "<\/div>");
ready
Array join
var s = ["<div>", "<div>", "<div>", "<div>", "string", "<\/div>", "<\/div>", "<\/div>", "<\/div>"].join("");
ready

Revisions

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