summaryrefslogtreecommitdiff
path: root/repo-settings.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2020-02-04 22:22:36 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-05 10:24:15 -0800
commitf13ca7cef51cc709c645f9da97f09a150bdb2cac (patch)
tree663eb5711a834524d422cceee285d9afca1795e9 /repo-settings.c
parentname-rev: don't _peek() in create_or_update_name() (diff)
downloadtgif-f13ca7cef51cc709c645f9da97f09a150bdb2cac.tar.xz
name-rev: put struct rev_name into commit slab
The commit slab commit_rev_name contains a pointer to a struct rev_name, and the actual struct is allocated separatly. Avoid that allocation and pointer indirection by storing the full struct in the commit slab. Use the tip_name member pointer to determine if the returned struct is initialized. Performance in the Linux repository measured with hyperfine before: Benchmark #1: ./git -C ../linux/ name-rev --all Time (mean ± σ): 953.5 ms ± 6.3 ms [User: 901.2 ms, System: 52.1 ms] Range (min … max): 945.2 ms … 968.5 ms 10 runs ... and with this patch: Benchmark #1: ./git -C ../linux/ name-rev --all Time (mean ± σ): 851.0 ms ± 3.1 ms [User: 807.4 ms, System: 43.6 ms] Range (min … max): 846.7 ms … 857.0 ms 10 runs Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repo-settings.c')
0 files changed, 0 insertions, 0 deletions