Concatenation vs Array Join (v24)

Revision 24 of this benchmark created on


Preparation HTML

<script>
  var str, str1, i, j;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Concatenation
for (i = 0; i < 10000; i++) {
 str += 'abcdefghijklmnop<test></test>';
}
ready
Array.prototype.join
var tmp = [];
for (j = 0; j < 10000; j++) {
 tmp.push('abcdefghijklmnop<test></test>');

}
str2 = tmp.join('');
ready

Revisions

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