Closed hauleth closed 5 days ago
Replace uses of || with or in cases where both sides of operator are for sure boolean.
||
or
Reason for that is that || works on other values than boolean, which mean that a || b is translated to:
a || b
case a do val when val in [nil, false] -> b _ -> a end
Which needs to perform more tests and cannot be optimised that easily by the compiler. New code should be easier for compiler to optimise.
What kind of change does this PR introduce?
Replace uses of
||
withor
in cases where both sides of operator are for sure boolean.Reason for that is that
||
works on other values than boolean, which mean thata || b
is translated to:Which needs to perform more tests and cannot be optimised that easily by the compiler. New code should be easier for compiler to optimise.