10K string concat (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array.join
var html = [],
    i;
for (i = 0; i < 10000; i++) {
 html.push('a');
}
html.join('');
ready
String concatenation
var html, i;
for (i = 0; i < 10000; i++) {
 html += 'a';
}
ready
Array extension
var html = [],
    i;
for (i = 0; i < 10000; i++) {
 html[html.length] = 'a';
}
html.join('');
ready

Revisions

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