On Sun, May 8, 2016 at 9:36 PM, Jim Meyering <j...@meyering.net> wrote: > tags 20250 notabug > close 20250 > done > > On Fri, Apr 3, 2015 at 6:20 AM, Andreas <wiis...@web.de> wrote: >> Dear diff-team, >> >> this is not a bug but an idea for a diff option in further versions: >> >> Idea: >> comparison of two files by size only. >> >> why? >> makes comparison extremely fast; often no need to compare file contents >> to get a first hint whether there is a difference at all >> >> example: >> - uploading a folder with a bunch of files to a slow motion cloud; >> comparing each file by contents is very time consuming (...slow motion >> cloud) >> - as a first hint to find out about a possible difference could be the >> comparison of file size for each file uploaded with the local ones > > Thanks for the suggestion, but diff already performs the optimization, > when possible, of detecting when two files have different sizes, > and in that case does not even bother to open > (much less read/compare) them.
To clarify: the above is what happens when you use the --brief (-q) option. It is obviously not the default.