diff options
author | Nicolas Pitre <nico@cam.org> | 2008-09-02 10:22:20 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-02 17:05:47 -0700 |
commit | a8032d12241f2226a6ab98272b12a1d98ca446a5 (patch) | |
tree | 4c05ad594960539a478a2646fcb2b22c66a68aaa /t/t4013/diff.diff-tree_--cc_master | |
parent | Merge branch 'np/maint-safer-pack' into np/pack (diff) | |
download | tgif-a8032d12241f2226a6ab98272b12a1d98ca446a5.tar.xz |
sha1write: don't copy full sized buffers
No need to memcpy() source buffer data when we might just process the
data in place instead of accumulating it into a separate buffer.
This is the case when a whole buffer would have been copied, summed,
written out and then discarded right away.
Also move the CRC32 processing within the loop so the data is more likely
to remain in the L1 CPU cache between the CRC32 sum, SHA1 sum and the
write call.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_--cc_master')
0 files changed, 0 insertions, 0 deletions