1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 15:56:09 +02:00
git/reftable
Patrick Steinhardt f1bf54aee3 reftable: allow inlining of a few functions
We have a few functions which are basically just accessors to
structures. As those functions are executed inside the hot loop when
iterating through many refs, the fact that they cannot be inlined is
costing us some performance.

Move the function definitions into their respective headers so that they
can be inlined. This results in a performance improvement when iterating
over 1 million refs:

    Benchmark 1: show-ref: single matching ref (revision = HEAD~)
      Time (mean ± σ):     105.9 ms ±   3.6 ms    [User: 103.0 ms, System: 2.8 ms]
      Range (min … max):   103.1 ms … 133.4 ms    1000 runs

    Benchmark 2: show-ref: single matching ref (revision = HEAD)
      Time (mean ± σ):     100.7 ms ±   3.4 ms    [User: 97.8 ms, System: 2.8 ms]
      Range (min … max):    97.8 ms … 124.0 ms    1000 runs

    Summary
      show-ref: single matching ref (revision = HEAD) ran
        1.05 ± 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>
2024-03-04 10:19:49 -08:00
..
LICENSE
basics.c reftable/stack: use `size_t` to track stack length 2024-02-06 12:10:08 -08:00
basics.h reftable/stack: use `size_t` to track stack length 2024-02-06 12:10:08 -08:00
basics_test.c reftable: utility functions 2021-10-08 10:45:48 -07:00
block.c reftable/record: decode keys in place 2024-03-04 10:19:49 -08:00
block.h reftable/record: decode keys in place 2024-03-04 10:19:49 -08:00
block_test.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
blocksource.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
blocksource.h reftable: add blocksource, an abstraction for random access reads 2021-10-08 10:45:48 -07:00
constants.h reftable: (de)serialization for the polymorphic record type. 2021-10-08 10:45:48 -07:00
dump.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
error.c reftable: ensure git-compat-util.h is the first (indirect) include 2023-04-24 12:47:33 -07:00
generic.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
generic.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
iter.c reftable/merged: remove unnecessary null check for subiters 2024-03-04 10:19:39 -08:00
iter.h reftable/merged: remove unnecessary null check for subiters 2024-03-04 10:19:39 -08:00
merged.c reftable/merged: avoid duplicate pqueue emptiness check 2024-03-04 10:19:40 -08:00
merged.h reftable/merged: make `merged_iter` structure private 2024-03-04 10:19:30 -08:00
merged_test.c Merge branch 'ps/reftable-styles' 2024-02-12 13:16:10 -08:00
pq.c reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
pq.h reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
pq_test.c reftable/merged: make subiters own their records 2024-03-04 10:19:39 -08:00
publicbasics.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
reader.c Merge branch 'ps/reftable-iteration-perf' 2024-02-26 18:10:24 -08:00
reader.h reftable: read reftable files 2021-10-08 10:45:48 -07:00
readwrite_test.c Merge branch 'ps/reftable-styles' 2024-02-12 13:16:10 -08:00
record.c reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
record.h reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
record_test.c reftable/record: decode keys in place 2024-03-04 10:19:49 -08:00
refname.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
refname.h reftable: implement refname validation 2021-10-08 10:45:48 -07:00
refname_test.c reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
reftable-blocksource.h reftable: add blocksource, an abstraction for random access reads 2021-10-08 10:45:48 -07:00
reftable-error.h reftable: signal overflow 2021-12-23 12:28:34 -08:00
reftable-generic.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
reftable-iterator.h reftable: generic interface to tables 2021-10-08 10:45:48 -07:00
reftable-malloc.h reftable: utility functions 2021-10-08 10:45:48 -07:00
reftable-merged.h reftable/stack: use `size_t` to track stack length 2024-02-06 12:10:08 -08:00
reftable-reader.h reftable: read reftable files 2021-10-08 10:45:48 -07:00
reftable-record.h reftable/record: reuse refname when decoding 2024-03-04 10:19:40 -08:00
reftable-stack.h reftable: implement stack, a mutable database of reftable files. 2021-10-08 10:45:48 -07:00
reftable-tests.h reftable: add a heap-based priority queue for reftable records 2021-10-08 10:45:48 -07:00
reftable-writer.h reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
stack.c Merge branch 'ps/reftable-styles' 2024-02-12 13:16:10 -08:00
stack.h reftable/stack: index segments with `size_t` 2024-02-06 12:10:08 -08:00
stack_test.c Merge branch 'ps/reftable-styles' 2024-02-12 13:16:10 -08:00
system.h reftable/stack: fix race in up-to-date check 2024-01-18 12:02:09 -08:00
test_framework.c reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
test_framework.h reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
tree.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
tree.h reftable: a generic binary tree implementation 2021-10-08 10:45:48 -07:00
tree_test.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
writer.c Merge branch 'ps/reftable-styles' 2024-02-12 13:16:10 -08:00
writer.h reftable: honor core.fsync 2024-01-23 13:45:27 -08:00