aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-03-04 11:49:26 +0100
committerJunio C Hamano <gitster@pobox.com>2024-03-04 10:19:49 -0800
commit6620f9134cc36189eecd88375a226a7bd7836a8a (patch)
tree466a56621f570f759fb0e0d4296ebc57a975c2c6 /builtin/commit.c
parentreftable/record: reuse refname when decoding (diff)
downloadgit-6620f9134cc36189eecd88375a226a7bd7836a8a.tar.gz
git-6620f9134cc36189eecd88375a226a7bd7836a8a.zip
reftable/record: reuse refname when copying
Do the same optimization as in the preceding commit, but this time for `reftable_record_copy()`. While not as noticeable, it still results in a small speedup when iterating over 1 million refs: Benchmark 1: show-ref: single matching ref (revision = HEAD~) Time (mean ± σ): 114.0 ms ± 3.8 ms [User: 111.1 ms, System: 2.7 ms] Range (min … max): 110.9 ms … 144.3 ms 1000 runs Benchmark 2: show-ref: single matching ref (revision = HEAD) Time (mean ± σ): 112.5 ms ± 3.7 ms [User: 109.5 ms, System: 2.8 ms] Range (min … max): 109.2 ms … 140.7 ms 1000 runs Summary show-ref: single matching ref (revision = HEAD) ran 1.01 ± 0.05 times faster than show-ref: single matching ref (revision = HEAD~) Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions