DO loop instead of REPEAT

The DO loop constructs are much faster than the REPEAT loop (when you don't need the extra that REPEAT provides... if you don't know what the extra is, you probably don't need it).

You can have some fun confirming this with the following code (It doesn't take many loops to have execution times in seconds!):

DEFINE TEMP-TABLE aTempTable NO-UNDO
 FIELD cTest AS CHARACTER.

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE cResults AS CHARACTER NO-UNDO INITIAL "".
DEFINE VARIABLE iMethodTime AS INTEGER NO-UNDO.
&SCOPED-DEFINE NumLoops  1000000
&SCOPED-DEFINE NumLoops2 100000

ETIME(TRUE).
REPEAT i = 1 TO {&NumLoops}:
END.
iMethodTime = ETIME.
cResults = cResults + "~n Method 1:" + STRING(iMethodTime).

ETIME(TRUE).
DO i = 1 TO {&NumLoops}:
END.
iMethodTime = ETIME.
cResults = cResults + "~n Method 2:" + STRING(iMethodTime).

/*test with record creation*/
ETIME(TRUE).
REPEAT i = 1 TO {&NumLoops2}:
  CREATE aTempTable.
END.
iMethodTime = ETIME.
cResults = cResults + "~n Method 1:" + STRING(iMethodTime).

EMPTY TEMP-TABLE aTempTable.
ETIME(TRUE).
DO i = 1 TO {&NumLoops2}:
  CREATE aTempTable.
END.
iMethodTime = ETIME.

cResults = cResults + "~n Method 2:" + STRING(iMethodTime).
MESSAGE cResults VIEW-AS ALERT-BOX.

A couple of results on my machine (btw, both methods are faster using 10.1C then using 10.1B or 10.1A...):
Method 1:437
Method 2:281 - 35% faster
Method 1:2641
Method 2:2109 - 20% faster