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 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1
Test name |
Executions per second |
test equality |
12901.1 Ops/sec |
test strict equality |
12920.9 Ops/sec |
Tests:
-
test equality
-
test strict equality
Open this result on MeasureThat.net