
2 Mar
2004
2 Mar
'04
7:32 p.m.
I forgot to mention that benchmarking code randomly changed the order of tests to minimize the disparity in cache hit/miss ratios. Also, big difference in writing/creation times between memory-mapped and file-based I/O may mean that memory-mappings implement cached writes whereas file writes are somehow write-through, though it doesn't seem to be the case according to documentation. Perhaps CloseHandle() waits until all dirty cache pages are written to the device but does not wait for the dirty pages that belonged to the memory mapping. It is also possible that file-based writes and memory-mapped writes are logged differently in the NTFS journal. None of this should apply to reads, though. ...Max...