[Solved] Why is a GOTO loop much slower than a FOR loop and depends additionally on power supply?


According to this analysis of the interpreter, the FOR variable will be expanded in phase 4, so the interpreter will know how many times to execute the command and on what values immediately. In contrast, each GOTO is interpreted in phase 7, and it requires scanning the file anew looking for the label each time, which accounts for the perceived time difference.

solved Why is a GOTO loop much slower than a FOR loop and depends additionally on power supply?