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

Revision 35 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[i] = 'a';
 res[i+1] = '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.