Hello All,
Check this source, and let it run on your computer...
It will do some read/write operations, and give the delayed time..
First try with X% and therafter remove the % from all the FOR/NEXT lines.
When the % charz are present, the program runs so fast, that it ends before
the timer changes. When the % charz are removed, it slows down to more than
90%!!
Can somebody explain me why this is, and if there is a way to do it faster?
CUT DA CRAP HERE
TYPE MT
DD AS STRING * 8
END TYPE
DIM TL AS MT
CLS
OPEN "BLOODY.RND" FOR RANDOM AS #1 LEN=LEN(TL)
PRINT "65536 RANDOM RECORD writes: "; TIMER
FOR X% = 1 to 65536
TL.DD = "BLOODY!"
Record = INT(RND * 255) + 1
PUT #1, Record, TL
NEXT x%
PRINT "End : "; TIMER
PRINT "65536 RANDOM RECORD reads : "; TIMER
FOR X% = 1 to 65536
Record = INT(RND * 255) + 1
GET #1, Record, TL
NEXT x%
PRINT "End : "; TIMER
CLOSE #1
KILL "BLOODY.RND"
PRINT
OPEN "BLOODY.RND" FOR OUTPUT AS #1
PRINT "65536 SEQUENTIAL writes : "; TIMER
FOR X% = 1 to 65536
PRINT #1, string$(80, "X")
NEXT X%
PRINT "End : "; TIMER
CLOSE #1
OPEN "BLOODY.RND" FOR INPUT AS #1
PRINT "65536 SEQUENTIAL reads : "; TIMER
FOR X% = 1 to 65536
LINE INPUT #1, Regel$
NEXT X%
PRINT "End : "; TIMER
CLOSE #1
KILL "BLOODY.RND"
PRINT "Checks Ready..."
END noname.bas
Mzzl,
sander@taf.idn.nl
... Fire at will, Not at Will!
--- FMail 1.02+ / GoldEd-
---------------
* Origin: Living in interesting times (2:281/607.11)
|