home *** CD-ROM | disk | FTP | other *** search
- '
- ' Timing test using the two directory routines I wrote.
- ' This program very slow running program!
- '
-
-
- $LINK "TTDIR105.PBU"
- $LINK "TTDIR101.PBU"
- $LINK "TTDIR100.PBU"
-
- ' Arrays for old sub-routine:
-
- DIM UDir$(255)
-
-
- ' Arrays for new sub-routine:
-
- DIM UD$(255, 3), FFD%(255,6), FFS&(255)
-
- %MaxRuns = 100
-
- Path$ = COMMAND$
- IF Path$ = "" THEN
- Path$ = "*.*"
- END IF
-
- N% = 0
-
- CLS
-
- PRINT "Kick back and take it easy."
- PRINT
- PRINT
- PRINT "The author of this program developed these programs using an IBM PS/2"
- PRINT "model 50 (runs around 8mHz). The program took about 2 minutes on that"
- PRINT "machine (I haven't bought a math chip yet!)."
- PRINT ""
- PRINT "This program is calling each sub-routine ";
- PRINT %MaxRuns
- PRINT "times without printing the directory on the screen. This should give"
- PRINT "you a good idea of the speed differences between the three versions of"
- PRINT "the sub-routines."
- PRINT
- PRINT
-
- UStart0! = TIMER
- FOR J% = 1 TO %MaxRuns
- CALL GetDir100(Path$, UDir$(), N%)
- NEXT J%
- UEnd0! = TIMER
-
- UStart! = TIMER
- FOR J% = 1 TO %MaxRuns
- CALL GetDir(Path$, UDir$(), N%)
- NEXT J%
- UEnd! = TIMER
-
- UStart2! = TIMER
- FOR J% = 1 TO %MaxRuns
- CALL GetDirectory(Path$, UD$(), FFD%(), FFS&(), N%)
- NEXT J%
- UEnd2! = TIMER
-
- PRINT "Original Version routine took: ";
- PRINT USING "######.### Seconds"; UEnd0! - UStart0!
- PRINT "Original Version modified slightly: ";
- PRINT USING "######.### Seconds"; UEnd! - UStart!
- PRINT "Version 1.05 took.................: ";
- PRINT USING "######.### Seconds"; UEnd2! - UStart2!
-
-