array-construction-push-vs-assign (v2)

Revision 2 of this benchmark created by Patrick on


Test runner

Ready to run.

Testing in
TestOps/sec
Assign
var a = Array(10e5);
for (var i = 0; i < 10e5; ++i) {
  a[i] = i;
}
ready
Push
var a = [];
for (var i = 0; i < 10e5; ++i) {
  a.push(i);
}
ready
No length given
var a = [];
for (var i = 0; i < 10e5; ++i) {
  a[i] = i;
}
ready

Revisions

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

  • Revision 1: published by KOBA789 on
  • Revision 2: published by Patrick on