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

Revision 108 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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