Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
set vs array iteration
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:124.0) Gecko/124.0 Firefox/124.0
Browser:
Firefox Mobile 124
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
array
10.6M/s
set
2.7M/s
View exact numbers
Test name
Executions per second
✓
array
10,599,070 Ops/sec
set
2,670,061 Ops/sec
Script Preparation code:
var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var b = new Set(a)
Tests:
array
for (const x of a) {}
set
for (const x of b) {}