Hi, On Thu, 14 Dec 2006, Shawn Pearce wrote: > My first version of the patch had the hash comparsion right after we > called diff_populate_filespec to get the size data. But then I realized > that very often the sizes will be different and the src->size != > dst->size comparsion will tend to be true most of the time, thus saving > us a (relatively) expensive hash comparsion, which we know must fail > anyway if the sizes differed. Ah! I misunderstood. Since the call to diff_populate_filespec was not visible in the hunk, I erroneously assumed that you meant to _check_ the sizes before checking the hashes. But your explanation makes lots of sense to me. May I request a short comment above the new code, like "let diff_populate_filespec() do its thing since we need the filesize later on anyway, and having that, do the cheaper filesize check before the more expensive hashcmp()"? Ciao, Dscho - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html