Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Test array reverse and pop vs shift
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Zaap3.6.8
Browser:
Chrome 123
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
reverse and pop
33.6M/s
shift
14.2M/s
View exact numbers
Test name
Executions per second
✓
reverse and pop
33,635,212 Ops/sec
shift
14,202,446 Ops/sec
Tests:
reverse and pop
let arr = [1,2,3,4,5] arr.reverse() while(arr.length > 0) { arr.pop() }
shift
let arr = [1,2,3,4,5] while(arr.length > 0) { arr.shift() }