LOOP FOR I := 1 TO 1000
IF (Test) THEN
Here, the test is performed each time through the loop. The following performs the test once:
The second version here reduces the number of instructions executed, but the code takes more space.