Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.includes vs Set.has vas Map.has with large data set
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/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Set has
134.9M/s
Map has
131.0M/s
Array includes
68.8M/s
View exact numbers
Test name
Executions per second
✓
Set has
134,860,896 Ops/sec
Map has
130,963,336 Ops/sec
Array includes
68,758,496 Ops/sec
Script Preparation code:
var a = Array(100000).fill().map((i,n)=>n); var b = new Set(a); var c = new Map(a.map(n=>([n,n])));
Tests:
Array includes
return a.includes(9);
Set has
return b.has(9);
Map has
return c.has(9);