Next | Program Repair Shop | 7 |
Of course, all sorts of optimizations are possible:
If A = B, then A = C if and only if A = B
Use stat to get file sizes first
Compare content only when sizes match
Use stat to get device / i-number pair
Compare content only when inodes differ
Calculate checksum of file contents; store checksums instead of contents
Store initial 8kb of each file in memory
Compare contents only when initial blocks match
Next | ![]() |
Copyright © 2006 M. J. Dominus |