push/pop vs unshift/shift (v49)

Revision 49 of this benchmark created on


Setup

var l = [];

Test runner

Ready to run.

Testing in
TestOps/sec
reverse push
for (var i = 0; i < 1500; i++) {
  l.push(i);
}

l.reverse();
ready
unshift
for (var i = 0; i < 1500; i++) {
  l.unshift(i);
}
ready

Revisions

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