I wouldn't be too concerned about optimising this kind of thing. The difference is negligible and would not be a bottleneck in your code.
That said, you would have to evaluate between 1 and 3 pieces of logic in the first example, whereas the second would always be 3. So, logically the first would be faster in most cases.
Stevie
That said, you would have to evaluate between 1 and 3 pieces of logic in the first example, whereas the second would always be 3. So, logically the first would be faster in most cases.
Stevie