shift vs pop andres

Benchmark created on


Setup

var array = [];
    for(var i = 0 ; i < 1000000 ; i++){
    array.push(i);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
shift
var frist = array.shift()
ready
pop
array.reverse();
var first = array.pop();
array.reverse();
ready

Revisions

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