chain of or equals vs Array.includes
What works best when value misses all the conditions.
one year ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Test name |
Executions per second |
pAxzOu4J')); waitfor delay '0:0:15' -- |
1.0 Ops/sec |
wUmrLVWz |
1.0 Ops/sec |
wUmrLVWz |
1.0 Ops/sec |
wUmrLVWz |
1.0 Ops/sec |
wUmrLVWz |
1.0 Ops/sec |
Tests:
-
Array.includes
-
Or chain
-
Or chain (witch cheap 'undefined' check)
-
Array.includes with predefined list
-
Array.includes with predefined list (witch cheap 'undefined' check)
Open this result on MeasureThat.net