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:
9 months ago
Test name
Executions per second
unshift
117520.5 Ops/sec
push and reverse
1208899.8 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()