|
-
Jun 3rd, 2008, 11:05 AM
#1
Thread Starter
Hyperactive Member
HDD access time.
All HDD (7200, SATA) has access time close to 8ms, but I found strange thing. I have standard drives (2 seagates 7200.10 in RAID 0), and I've wrote application to access to small part of file on my HDD. Access to one file, and get 400 bytes (I tried many files, all the same result), takes... 0ms. More; I've wrote loop, to access different parts of this file, and it gets 9ms for 100 different parts! It's like 0,09 ms for each! I think, there is no mistake: time is in 'ms', not 's', parts are different, not from RAM, and I don't have SSD Maybe someone can tell me, why the 'access time' is about 8ms then?
Code:
Module Module1
Sub Main()
Dim stopw As New Stopwatch
stopw.Start()
Dim strContent As String = Space(400)
For i As Integer = 1 To 100
Dim FileNum As Integer = FreeFile()
FileOpen(FileNum, "Any File Here", OpenMode.Binary, OpenAccess.Read)
FileGet(FileNum, strContent, i * 1000)
FileClose(FileNum)
Next
stopw.Stop()
Console.WriteLine(strContent.Length)
Console.WriteLine("Time : " & stopw.ElapsedMilliseconds & " ms")
Console.Read()
End Sub
End Module
Last edited by Ivenesco; Jun 3rd, 2008 at 11:10 AM.
"Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
Albert Einstein
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|