On Fri, 23 Dec 2011 09:28:52 +0100, Peter Otten wrote: >> -proper & efficient detection of file-change, to know whether the user >> actually did anything > > Just read the whole thing back into memory and compare the string to the > original data. The file has to be quite long for the checksum > calculation to be worthwhile.
I don't think so. No matter how long the file is, the checksum is always going to do far more work than a simple string comparison. A string comparison can short-circuit on the first difference; the checksum must always process both files in their entirety. -- Steven -- http://mail.python.org/mailman/listinfo/python-list