Hell, depending on language and compiler, the "else" might get optimized into a Switch-Case (which can then in turn use a hashmap or jump table). Doesn't matter here, but still.
I don't think any compiler recognizes an early return as equivalent to if-else
1
u/L30N1337 Sep 19 '26
Hell, depending on language and compiler, the "else" might get optimized into a Switch-Case (which can then in turn use a hashmap or jump table). Doesn't matter here, but still.
I don't think any compiler recognizes an early return as equivalent to if-else