Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
pop() vs shift()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 15; Mobile; rv:145.0) Gecko/145.0 Firefox/145.0
Browser:
Firefox Mobile 145
Operating system:
Android
Device Platform:
Mobile
Date tested:
5 months ago
Test name
Executions per second
pop
35210464.0 Ops/sec
shift
707902656.0 Ops/sec
Script Preparation code:
var array = []; for(var i = 0; i < 100000; i++){array.push(Math.random());}
Tests:
pop
while (array.length > 0) { array.pop(); }
shift
while (array.length > 0) { array.shift(); }