push/pop vs unshift/shift (v38)

Revision 38 of this benchmark created on


Setup

var l = [];

Test runner

Ready to run.

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

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

Revisions

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