Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Array Pop vs setting array length
Comparing array pop vs setting array length
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Array set length
4K/s
Array pop
2K/s
View exact numbers
Test name
Executions per second
✓
Array set length
3,803 Ops/sec
Array pop
2,412 Ops/sec
Tests:
Array pop
let array = new Array(100000).fill(0); while (array.length > 0) { array.pop(); }
Array set length
let array = new Array(100000).fill(0); array.length = 0;