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:
4 months ago
by:
Guest
Jump 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:
4 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
Test name
Executions per second
Set
5478949.0 Ops/sec
Array
71983800.0 Ops/sec
Related benchmarks:
Array vs Set inclusion - 2
Some vs includes
set vs array
lookup tests
set.has vs. array.includes on big arrays sf
set.has vs. array.includes on big arr
set.has vs. array.includes vs array.indexOf (for 10n, 100n and 10000n)
set.has vs. array.includes performance
Test_every_2
Comments
Confirm delete:
Do you really want to delete benchmark?