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

Revision 84 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
var res = '';
for (var i = 0; i < 1000; i++) {
 res += 'a';
}
ready
join-with-push
var res = [];
for (var i = 0; i < 1000; i++) {
 res.push('a');
}
res = res.join('');
ready
join-without-push
var res = [];
for (var i = 0; i < 1000; i++) {
 res[i] = 'a';
}
res = res.join('');
ready
join-without-push 2
var res = new Array(1000);
for (var i = 0; i < 1000; i++) {
 res[i] = 'a';
}
res = res.join('');
ready
join-without-push without join
var res = new Array(1000);
for (var i = 0; i < 1000; i++) {
 res[i] = 'a';
}
 
ready

Revisions

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