Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
create Set vs Array
(version: 1)
Comparing performance of:
Set vs Array
Created:
7 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Tests:
Set
var data1= new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) var data2= new Set([1,2,3]) data1.has(10) data2.has(2)
Array
var data1= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] var data2= [1,2,3] data1.includes(10) data2.includes(2)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Set
Array
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Array
72.0M/s
Set
5.5M/s
View exact numbers
Test name
Executions per second
✓
Array
71,983,800 Ops/sec
Set
5,478,949 Ops/sec
Related benchmarks
Some vs includes
set vs array
Comments
Confirm delete:
Do you really want to delete benchmark?