Skip to content

perf: Reduce external repo pointer allocations

Warren Gifford requested to merge core/repo-hydration-followup into master

Created by: tsenart

name                         old time/op    new time/op    delta
SearchResults-16               3.53ms ± 2%    3.55ms ± 1%    ~     (p=0.421 n=5+5)
IntegrationSearchResults-16    21.3ms ± 3%    20.3ms ± 5%  -4.71%  (p=0.032 n=5+5)
_zoektIndexedRepos-16          1.25ms ± 4%    1.25ms ± 2%    ~     (p=0.421 n=5+5)

name                         old alloc/op   new alloc/op   delta
SearchResults-16               1.97MB ± 0%    1.97MB ± 0%    ~     (p=0.548 n=5+5)
IntegrationSearchResults-16    6.88MB ± 0%    6.51MB ± 0%  -5.47%  (p=0.008 n=5+5)
_zoektIndexedRepos-16           551kB ± 0%     552kB ± 0%    ~     (p=0.881 n=5+5)

name                         old allocs/op  new allocs/op  delta
SearchResults-16                15.6k ± 0%     15.6k ± 0%    ~     (all equal)
IntegrationSearchResults-16      146k ± 0%      136k ± 0%  -6.84%  (p=0.008 n=5+5)
_zoektIndexedRepos-16            25.0 ± 0%      25.0 ± 0%    ~     (all equal)

Additionally, we realised there's no longer a need for either types.RepoIDs nor types.RepoIdentifier.

PS: go fmt -r is the true workhorse of these changes.

Merge request reports

Loading