Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
1000-Member Set vs Array Privilege Check
(version: 1)
Comparing performance of:
Includes Performance vs Has Performance
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var i = Math.floor(Math.random() * 1000) + 1; var a = [...Array(1000).keys()]; var b = new Set(a);
Tests:
Includes Performance
return a.includes(i);
Has Performance
return b.has(i);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Includes Performance
Has Performance
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Includes Performance
95531104.0 Ops/sec
Has Performance
117538032.0 Ops/sec
Related benchmarks:
Set.has vs. Array.includes
set.has vs. array.includes (big)
includes vs has 20220126
set.has vs. array.includes Performance 2
set.add vs. array.push
set.has vs. array.includes 10k el
Set vs Array Privilege Check
Member Set vs Array Privilege Check
500 Set vs Array Privilege Check
Comments
Confirm delete:
Do you really want to delete benchmark?