summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-12-11 09:08:46 +0000
committerJunio C Hamano <gitster@pobox.com>2020-12-14 09:34:50 -0800
commitb970b4ef62432980bf106c2f0970c25ae0de5cce (patch)
treeccfc74b0c744ffb3ceaa240a05c17bab0ee8fce4 /diff.c
parentac14de13b228285b798ed805812fe20d1bc55eb2 (diff)
diffcore-rename: simplify and accelerate register_rename_src()
register_rename_src() took pains to create an array in rename_src which was sorted by pathname of the contained diff_filepair. The sorting was entirely unnecessary since callers pass filepairs to us in sorted order. We can simply append to the end of the rename_src array, speeding up diffcore_rename() setup time. Also, note that I dropped the return type on the function since it was unconditionally discarded anyway. This patch is being submitted in a different order than its original development, but in a large rebase of many commits with lots of renames and with several optimizations to inexact rename detection, diffcore_rename() setup time was a sizeable chunk of overall runtime. This patch dropped execution time of rebasing 35 commits with lots of renames by 2% overall. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions