I am measuring performance and it seems window's CreateFile function call is actually not cheap and seems to depend on the file size? For a 400-500k file it's taking about 0.3 ms while a 100-200k file takes about 0.2ms. Any idea why this is the case? I would think CreateFile would just open a handle to the file and doesn't need to do any traversing? Any idea how to reduce this time? I cannot use fopen since I am using the Overlapped feature to do async IO.
Thanks