Let's say I've this piece of code:
age = 21;
allowedFromParents = false;
if (age >= 18 || allowedFromParents == true)
{
//go drink
}
When I'm debugging this part of code, when it checks the first part and that's true, then it goes already inside the statement without bothering to check the other statement.
Now, this is just an easy condition, but what if the condition statements were much larger to calculate, are inside a frequent loop and one will return a true more likely than the other.
Will then the order of the conditions matter for performance?