Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array.pop vs array[index]
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:144.0) Gecko/20100101 Firefox/144.0
Browser:
Firefox 144
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
array[index]
42.5 Ops/sec
array.pop()
41.7 Ops/sec
Script Preparation code:
window.bigArray = (new Array(10000)).fill(null).map((el, index) => index);
Tests:
array[index]
for(let index = 0; index < 10000; index ++) { const current = bigArray[index]; console.log(current); }
array.pop()
for(let index = 0; index < 10000; index ++) { const current = bigArray.pop(); console.log(current); }