Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
set vs array creation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 YaBrowser/24.7.0.0 Safari/537.36
Browser:
Yandex Browser 24
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
array
116K/s
set
3K/s
View exact numbers
Test name
Executions per second
✓
array
115,782 Ops/sec
set
3,077 Ops/sec
Tests:
array
const MAX = 10000 const arr = new Array(10000) const f = () => {} for (let i = 0; i < MAX;i++) { arr[i] = true if (arr[i]) f(); }
set
const set = new Set() const MAX = 10000 const f = () => {} for (let i = 0; i < MAX;i++) { set.add(i) if (set.has(i)) f(); }