[WORK] std.file.update function
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 19 20:36:24 PDT 2016
One way to implement it is to open the existing file as a memory-mapped file.
Memory-mapped files only get paged into memory as the memory is referenced. So
if you did a memcmp(oldfile, newfile, size), it will stop once the first
difference is found, and the rest of the file is never read.
Also, only the changed pages of the memory-mapped file have to be written. On
large files, this could be a big savings.
More information about the Digitalmars-d
mailing list