diff options
author | René Scharfe <l.s.r@web.de> | 2020-02-04 22:25:34 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-05 10:24:15 -0800 |
commit | 977dc1912bd74dbc7f94581f36b7e78eae49a8c3 (patch) | |
tree | 19ffd377274b29ffd0ae529af7ceeac250f9119a /Documentation/config/interactive.txt | |
parent | name-rev: pre-size buffer in get_parent_name() (diff) | |
download | tgif-977dc1912bd74dbc7f94581f36b7e78eae49a8c3.tar.xz |
name-rev: generate name strings only if they are better
Leave setting the tip_name member of struct rev_name to callers of
create_or_update_name(). This avoids allocations for names that are
rejected by that function. Here's how this affects the runtime when
working with a fresh clone of Git's own repository; performance numbers
by hyperfine before:
Benchmark #1: ./git -C ../git-pristine/ name-rev --all
Time (mean ± σ): 437.8 ms ± 4.0 ms [User: 422.5 ms, System: 15.2 ms]
Range (min … max): 432.8 ms … 446.3 ms 10 runs
... and with this patch:
Benchmark #1: ./git -C ../git-pristine/ name-rev --all
Time (mean ± σ): 408.5 ms ± 1.4 ms [User: 387.2 ms, System: 21.2 ms]
Range (min … max): 407.1 ms … 411.7 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 'Documentation/config/interactive.txt')
0 files changed, 0 insertions, 0 deletions