Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array .push() vs .unshift()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 15; Mobile; rv:137.0) Gecko/137.0 Firefox/137.0
Browser:
Firefox Mobile 137
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
.push()
19.5M/s
.unshift()
746K/s
View exact numbers
Test name
Executions per second
✓
.push()
19,534,420 Ops/sec
.unshift()
746,012 Ops/sec
Script Preparation code:
var arr = []
Tests:
.unshift()
arr.unshift(42)
.push()
arr.push(42)