Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
map.has vs. array.includes - large array - random Access
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Browser:
Firefox 137
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
includes
21757.3 Ops/sec
lookup
2182811136.0 Ops/sec
Script Preparation code:
var a = []; var b = new Map() for(let i = 0; i < 100000; i++){ a.push(i); b.set(i, Math.random()); }
Tests:
includes
return a.includes(Math.floor(Math.random()*100000))
lookup
return b.has(Math.floor(Math.random()*100000))