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
Test name
Executions per second
Array includes
68758496.0 Ops/sec
Set has
134860896.0 Ops/sec
Map has
130963336.0 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);