Here is the kicker though, originally I had "State = 0" so the if statement was false, the IfTest was faster the NoOfTest ??? I have to do a similar test at some point in C/C++ and use the -03 flag and see how big (if any) a difference it makes.
Printable View
Here is the kicker though, originally I had "State = 0" so the if statement was false, the IfTest was faster the NoOfTest ??? I have to do a similar test at some point in C/C++ and use the -03 flag and see how big (if any) a difference it makes.
well, that makes sense. i guess an if loop can be faster than the for one sometimes. but like you said there's not really a significant difference in speed.
I suppose it is due to scripts being interpreted rather then pre-compiled and there is no (?) optimisation stage when the script is ran 'on the fly' so the difference is negible if any.