From: Jeff King Date: Sun, 28 Mar 2021 08:38:51 GMT Subject: Re: [PATCH v2] csum-file: make hashwrite() more readable Message-ID: In-Reply-To: On Fri, Mar 26, 2021 at 12:38:11PM +0000, Derrick Stolee via GitGitGadget wrote: > However, during this investigation, I inspected hashwrite() and > misunderstood it, even after looking closely and trying to make it > faster. This change simply reorganizes some parts of the loop within > hashwrite() to make it clear that each batch either uses memcpy() to the > hashfile's buffer or writes directly from the input buffer. The previous > code relied on indirection through local variables and essentially > inlined the implementation of hashflush() to reduce lines of code. Thanks, I think this nicely argues for the change here (and I agree the result, especially with the comments, is much easier to understand). -Peff