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

Revision 87 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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