Which equals operator (== vs ===) is faster?
Is there a performance benefit to replacing == with ===?
2 years ago
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1
Test name |
Executions per second |
test equality |
10245.7 Ops/sec |
test strict equality |
10005.1 Ops/sec |
Tests:
-
test equality
-
test strict equality
Open this result on MeasureThat.net