I think the extra time might be due to Map/UnmapViewOfFile... is that
possible?
In principle we could use, say, fread and copy a fixed amount of bytes to
some buffer. Is that the preferred way?
For an application that does one pass through a file in purely sequential
order, memory mapping is not a win. You would be much better off to use
ReadFile or fread and get some buffering.
Consider what you're asking. You map in an entire gigabyte. Then, when
you're done with that one and move to the next one, that entire gigabyte
becomes free memory, and it has to map in the SECOND entire gigabyte
before
it can continue. With the normal ReadFile routines, the operating system
will be reading ahead so that you overlap your activity with the disk to
the maximum extent possible.
--
seconds anyway... so I'm still confused.
much faster...