diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-03-04 11:49:26 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-04 10:19:49 -0800 |
commit | 6620f9134cc36189eecd88375a226a7bd7836a8a (patch) | |
tree | 466a56621f570f759fb0e0d4296ebc57a975c2c6 /commit-slab-impl.h | |
parent | 71d9a2e99138ed401e2678b4295b72210a398346 (diff) |
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 'commit-slab-impl.h')
0 files changed, 0 insertions, 0 deletions