Am 02.09.2011, 16:08 Uhr, schrieb Andrej Mitrovic <[email protected]>:

On 9/2/11, Walter Bright <[email protected]> wrote:
On Windows, we should just stick with the Windows CopyFile function:

http://msdn.microsoft.com/en-us/library/aa363851(v=vs.85).aspx

And let the MS guys do their thing. Presumably they will do what works best
on
Windows.


I've given OP's code a few test runs but I just get inconsistent
results. Sometimes the async version is twice as fast, other times a
simple call via system("copy file1 file2") is faster.

Anyway, I'm assuming the MS devs optimized copying beyond the little
snippet we have here.. :p

Yeah, to get consistent results we'd need at minimum:
- fixed target location on disk
  (sectors to the end are ~2x slower,
   can be ensured by not truncating/erasing the target on every run)
- ability to disable / clear the read cache (possible on Linux)
- give the process real-time I/O priority

Reply via email to