Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
includes2
(version: 1)
Comparing performance of:
array vs obj vs set vs map
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var a = Array(10000).fill(undefined).map((_, i) => i); var b = a.reduce((acc, el) => { acc[el] = true; return acc }, {}); var c = new Set(a); var d = new Map(a.map(el => [el, true]));
Tests:
array
return a.includes(200)
obj
return b['200']
set
return c.has(200)
map
return d.get(200)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
array
obj
set
map
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?