Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
set vs array find if exists 2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Browser:
Chrome 108
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
array
591.6M/s
set
576.9M/s
View exact numbers
Test name
Executions per second
✓
array
591,599,424 Ops/sec
set
576,916,992 Ops/sec
Script Preparation code:
var a = []; for(i=0;i<10000;i++) a.push(i); var b = new Set(a)
Tests:
array
a.indexOf(342);
set
b.has(342);