]> git.ipfire.org Git - thirdparty/git.git/commit
merge-ort: switch our strmaps over to using memory pools
authorElijah Newren <newren@gmail.com>
Fri, 30 Jul 2021 11:47:40 +0000 (11:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jul 2021 16:01:19 +0000 (09:01 -0700)
commit6697ee01b5d31df5c83ace9eabb6285cf42ff172
tree7df0f4948935ef3b5863f79f1be0f9300cfc2acc
parent4137c54b902faa640c485dc6d20eaac946e503a5
merge-ort: switch our strmaps over to using memory pools

For all the strmaps (including strintmaps and strsets) whose memory is
unconditionally freed as part of clear_or_reinit_internal_opts(), switch
them over to using our new memory pool.

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:      202.5  ms ±  3.2  ms    198.1 ms ±  2.6 ms
    mega-renames:      1.072 s ±  0.012 s    715.8 ms ±  4.0 ms
    just-one-mega:   357.3  ms ±  3.9  ms    276.8 ms ±  4.2 ms

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c