string concat vs array join (v10)

Revision 10 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Concat
var text = '';

for(var i = 0; i < 4096; i++)
{
    text += String.fromCharCode(i) + String.fromCharCode(i+1);
}


ready
Join
var a = [];

for(var i = 0; i < 4096; i++)
{
    a.push(String.fromCharCode(i), String.fromCharCode(i+1));
}

var text = a.join('');
ready

Revisions

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