Test case name | Result |
---|---|
Array.includes, 10 000 elements | |
Array.includes, 1 000 000 elements | |
Set.has, 10 000 elements | |
Set.has, 1 000 000 elements | |
Array to Set + Set.has, 10 000 elements | |
Array to Set + Set.has x 100, 10 000 elements | |
Array.includes x 100, 10 000 elements |
Test name | Executions per second |
---|---|
Array.includes, 10 000 elements | 21533.2 Ops/sec |
Array.includes, 1 000 000 elements | 200.5 Ops/sec |
Set.has, 10 000 elements | 6863807.0 Ops/sec |
Set.has, 1 000 000 elements | 6660393.5 Ops/sec |
Array to Set + Set.has, 10 000 elements | 527.2 Ops/sec |
Array to Set + Set.has x 100, 10 000 elements | 802.5 Ops/sec |
Array.includes x 100, 10 000 elements | 223.7 Ops/sec |