Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 23rd Jul 2011 12:57 Edited at: 23rd Jul 2011 12:59
VB6:
t1 = Timer()

Open "D:\1.txt" For Input As #1
Do Until EOF(1)
Input #1, a$
Loop
Close #1

t2 = Timer()

Text1.Text = "Time=" + CStr((t2 - t1)) + " sec. =" + CStr(((t2 - t1)) / 60) + " minut."

--------------------------------------

DarkBasicpro:

t1=timer()
open to read 1,"D:\1.txt"
while file end(1)=0
read string 1,a$
endwhile
close file 1
t2=timer()

print "Time=";(t2-t1)/1000;" sec. ";((t2-t1)/1000)/60;"= min."

-------------------------

result:

1.txt - 140 mb

time VB6 = 7 sec = < 1 min
time DarkBasicpro = 447 sec = >7 minut.

why so slow?

[email protected]
icq: 157980031
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Jul 2011 14:33
How does that compare to my replacement file I/O commands?



You'll need to download and install my free plug-ins to run the code.

Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 23rd Jul 2011 15:00
ok

[email protected]
icq: 157980031

Login to post a reply

Server time is: 2026-07-10 15:31:25
Your offset time is: 2026-07-10 15:31:25