while vs while-if of what is more fast?

Asked by Guillermo

Hello!

I need to know what is more fast:

###################

Code 1:

while True:
    if exists(image,0):
        break

###################

Code 2:

while not exists(image,0):
    pass

###################

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Same

Revision history for this message
Guillermo (wishen) said :
#2

Thanks RaiMan, that solved my question.