If we let apart the typos, 'while' is faster than calling a function. So put 4 'while' in a function.
But even so, excuse me for suggesting (sorry if I don't understand what you want to do) -- why do you use 'while' instead of 'if' in the first snippet?
Further, in 'firstfunction' definition, wait(1) in the 'if' blocks -- you want to skip the following 'if' checks? Cause you won't.
In 'secondfunction' definition, using wait(1) in a one time 'if' statement instead of a loop is suspicious.
I think (not sure) that 'while' and 'if' are of the same speed when using them for the same purpose, with the remark that in the 'while' you have to use wait(1) which is further consuming.
Last edited by mireazma; 05/22/10 13:18.