while vs while-if of what is more fast?

Asked by Guillermo on 2020-04-28

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2020-04-28
Last query:
2020-04-28
Last reply:
2020-04-28
Best RaiMan (raimund-hocke) said : #1

Same

Guillermo (wishen) said : #2

Thanks RaiMan, that solved my question.