summaryrefslogtreecommitdiff
path: root/builtin/mktree.c
diff options
context:
space:
mode:
authorLibravatar Tay Ray Chuan <rctay89@gmail.com>2011-08-17 09:53:57 +0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-17 17:15:05 -0700
commit27af01d552331eacf1ed2671b2b4b6ad4c268106 (patch)
treef74cdcae565bca29ad0ee78fb539d4e4df50738d /builtin/mktree.c
parentSync with "maint" (diff)
downloadtgif-27af01d552331eacf1ed2671b2b4b6ad4c268106.tar.xz
xdiff/xprepare: improve O(n*m) performance in xdl_cleanup_records()
In xdl_cleanup_records(), we see O(n*m) performance, where n is the number of records from xdf->dstart to xdf->dend, and m is the size of a bucket in xdf->rhash (<= by mlim). Here, we improve this to O(n) by pre-computing nm (in rcrec->len(1|2)) in xdl_classify_record(). Reported-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mktree.c')
0 files changed, 0 insertions, 0 deletions