concat/join-with-push/join-without-push (v71)

Revision 71 of this benchmark created by Charmander on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
var str = '';

for (var i = 0; i < 10000; i++) {
    str += 'a';
}
ready
join-with-push
var res = [];

for (var i = 0; i < 10000; i++) {
    res.push('a');
}

var str = res.join('');
ready
join-without-push
var res = new Array(10000);

for (var i = 0; i < 10000; i++) {
    res[i] = 'a';
}

var str = res.join('');
ready

Revisions

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