here is a very simple code that opens a text file of about 4 mo to read it line by line and copy it to a new file. Here the speed gain is practically zero.
you need a text file of about 4 MB to test. i found the test file in the compressed archive Common Resource Files on this forum. you can find it here :
https://staging.qb64phoenix.com/showthread.php?tid=327
3.0x seconds : program compiled with qb64 -O3
3.0x seconds : program compiled with original qb64
Conclusion : in file reading and writing. no visible speed gain. don't forget that modern operating systems use a disk cache in memory, which can distort the results.
you need a text file of about 4 MB to test. i found the test file in the compressed archive Common Resource Files on this forum. you can find it here :
https://staging.qb64phoenix.com/showthread.php?tid=327
3.0x seconds : program compiled with qb64 -O3
3.0x seconds : program compiled with original qb64
Conclusion : in file reading and writing. no visible speed gain. don't forget that modern operating systems use a disk cache in memory, which can distort the results.
Code: (Select All)
$Console
Screen 0
start = Timer(.001)
Color 7: Print "Wait..."
Open "370099 Word List.txt" For Input As #1
Open "370099 Word List_output.txt" For Output As #2
Do
Line Input #1, chaine$
If EOF(1) Then
Print #2, chaine$;
Else
Print #2, chaine$
End If
Loop Until EOF(1)
Close #1
Close #2
Color 3: Print: Print Timer(.001) - start; "seconds"
Color 7
End