Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
unshift vs push and reverse
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
push and reverse
1.2M/s
unshift
118K/s
View exact numbers
Test name
Executions per second
✓
push and reverse
1,208,900 Ops/sec
unshift
117,520 Ops/sec
Tests:
unshift
let array = []; for (let i = 0; i < 200; i++) { array.unshift(i); }
push and reverse
let array = []; for (let i = 0; i < 200; i++) { array.push(i); } array.reverse()