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

Revision 90 of this benchmark created by Sasha Aickin on


Test runner

Ready to run.

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

Revisions

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