summaryrefslogtreecommitdiff
path: root/commit-tree.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-02-21 20:45:36 -0500
committerJunio C Hamano <junkio@cox.net>2006-02-22 00:36:09 -0800
commit6b7d25d97bdb8a26719f90d17ff5c9720be68762 (patch)
tree661dce6a7e0f319fa1c53eb94c34585ee52190e4 /commit-tree.c
parent8e1454b5ad285ec5dd25758e799c589045aff9d4 (diff)
downloadgit-6b7d25d97bdb8a26719f90d17ff5c9720be68762.tar.gz
diff-delta: produce optimal pack data
Indexing based on adler32 has a match precision based on the block size (currently 16). Lowering the block size would produce smaller deltas but the indexing memory and computing cost increases significantly. For optimal delta result the indexing block size should be 3 with an increment of 1 (instead of 16 and 16). With such low params the adler32 becomes a clear overhead increasing the time for git-repack by a factor of 3. And with such small blocks the adler 32 is not very useful as the whole of the block bits can be used directly. This patch replaces the adler32 with an open coded index value based on 3 characters directly. This gives sufficient bits for hashing and allows for optimal delta with reasonable CPU cycles. The resulting packs are 6% smaller on average. The increase in CPU time is about 25%. But this cost is now hidden by the delta reuse patch while the saving on data transfers is always there. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'commit-tree.c')
0 files changed, 0 insertions, 0 deletions