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
Test name
Executions per second
array
10599070.0 Ops/sec
set
2670061.0 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) {}