push/pop vs unshift/shift (v50)

Revision 50 of this benchmark created on


Setup

var pl = ['a', 'b', 'c', 'd'];

Test runner

Ready to run.

Testing in
TestOps/sec
Push/Access End
pl.push('e');
window.x = pl[pl.length - 1];
ready
Unshift/Access Beginning
pl.unshift('e');
window.x = pl[0];
ready
Set end/Access End
pl[pl.length] = 'e';
window.x = pl[pl.length - 1];
ready

Revisions

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