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

Revision 109 of this benchmark created by X on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
var res = '';
for (var i = 0; i < 10000; i++) {
 res += 'a12b12';
}
console.log(res);
ready
join-with-push
var res = [];
for (var i = 0; i < 10000; i++) {
 res.push('a12b12');
}
console.log(res.join(''));
ready
join-without-push
var res = [];
for (var i = 0; i < 10000; i++) {
 res[i] = 'a12b12';
}
console.log(res.join(''));
ready

Revisions

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