This is something simply to ease my curiosity, if someone would feel like answering it though that would be fantastic.
With if statements, is the time taken to calculate the result affected by the way it’s written?
So what I mean is (if that wasn’t overly clear) would the following two statements take the same amount of time to process?
if 1 < 2 and 3 = 3 then
//do something
end if
compared to
if 1 < 2 then
if 3 = 3 then
//Do something
end if
end if
If we consider that the compiler will not optimize these two calls, then the second statement will require two branching instructions instead of one. And branching requires some extra work for the CPU because of pipelining. So, technically, the second version will require more work, but it should not matter here.