Array.find existing vs Array.find non-existing vs Set.has existing vs Set.has non-ExistingFastest: Array.find existing (2.2x faster)
100,811,920 ops/sec
81,014,248 ops/sec
78,036,760 ops/sec
45,470,256 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Array.find existing | |
| Array.find non-existing | |
| Set.has existing | |
| Set.has non-Existing |
| Test name | Executions per second |
|---|---|
| ✓ Set.has non-Existing | 47,869,588 Ops/sec |
| Set.has existing | 45,339,616 Ops/sec |
| Array.find existing | 30,043,012 Ops/sec |
| Array.find non-existing | 24,686,876 Ops/sec |