Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS Push vs Unshift
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0
Browser:
Firefox 145
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
8 months ago
.push()
5.2M/s
.unshift()
5K/s
View exact numbers
Test name
Executions per second
✓
.push()
5,232,815 Ops/sec
.unshift()
4,856 Ops/sec
Script Preparation code:
const arr = []
Tests:
.push()
arr.push({name: "lorem1", label: "lorem1"}, {name: "lorem2", label: "lorem2"}, {name: "lorem3", label: "lorem3"})
.unshift()
arr.unshift({name: "lorem1", label: "lorem1"}, {name: "lorem2", label: "lorem2"}, {name: "lorem3", label: "lorem3"})