Re: [PATCH v2] csum-file: make hashwrite() more readable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux