summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-07-30 11:47:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-30 16:01:18 (GMT)
commitfa0e936fbb683dbce70b797ae8a5be6b88f48d88 (patch)
treeedf07ff60d6aa56feedc1992578cd82c03a0c4e4 /git.c
parent7afc0b03a2307aa02b7caff2746664e886f38d9a (diff)
downloadgit-fa0e936fbb683dbce70b797ae8a5be6b88f48d88.zip
git-fa0e936fbb683dbce70b797ae8a5be6b88f48d88.tar.gz
git-fa0e936fbb683dbce70b797ae8a5be6b88f48d88.tar.bz2
diffcore-rename: use a mem_pool for exact rename detection's hashmap
Exact rename detection, via insert_file_table(), uses a hashmap to store files by oid. Use a mem_pool for the hashmap entries so these can all be allocated and deallocated together. For the testcases mentioned in commit 557ac0350d ("merge-ort: begin performance work; instrument with trace2_region_* calls", 2020-10-28), this change improves the performance as follows: Before After no-renames: 204.2 ms ± 3.0 ms 202.5 ms ± 3.2 ms mega-renames: 1.076 s ± 0.015 s 1.072 s ± 0.012 s just-one-mega: 364.1 ms ± 7.0 ms 357.3 ms ± 3.9 ms Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions