It looks like you're new here. If you want to get involved, click one of these buttons!
antix            
            
                Member             
            if animName1 ~= "" then if actor.animName2 ~= animName1 then -- do stuff end end if animName2 ~= "" and actor.animName2 ~= animName2 then -- do stuff end  | 
Comments
It differs in a super little time, and it doesn't affect performance at all.
The main difference in my mind is that, how would you want to organize your code.
I often also use the first because of some "easier reading" things.
For example,
I also don't bother using "/" instead of "*" in calculation, even they said multiplication is faster than divide. But if using "/" somehow needed for easier reading, then i don't bother thinking about it too much.
I suspect the 2nd method will be the faster of the two.
Also, I might be wrong, but in the first method, the second if will have some extra bits to do because of possible localisation (for each of the if then's), but the 2nd method won't need to do this.
Likes: antix
https://deluxepixel.com