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

Revision 36 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
for (var res = '', i = 0; i < 10000; i+=2) {
 res += 'a' + 'b';
}
ready
join-with-push
for (var res = [], i = 0; i < 10000; i+=2) {
 res.push('a');
 res.push('b');
}
res = res.join('');
ready
join-without-push
for (var res = [], i = 0; i < 10000; i+=2) {
 res[res.length] = 'a';
 res[res.length] = 'b';
}
res = res.join('');
ready
concat2
for (var res = '', i = 0; i < 10000; i+=2) {
 res += 'a';
 res += 'b';
}
ready

Revisions

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