push/pop vs unshift/shift (v40)

Revision 40 of this benchmark created on


Preparation HTML

<script>
  var pl = ['a', 'b', 'c', 'd'];
  var sl = ['b', 'c', 'd', 'e'];
  
  var e, a, v;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Push/Pop
pl.push('e');
e = pl.shift();
ready
Unshift/Shift
sl.unshift('a');
a = sl.pop();
ready

Revisions

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