c333c2ce65
The previous patch almost halved the number of heap allocations for the sort subcommand. Reduce it further by using a mem_pool for the line objects. Note that t/perf/run can't be used directly to compare two versions of test-mergesort because it always runs the helpers from the checked-out version. So I hand-merged the results of separate runs before and with this patch: macOS 12.5.1 on M1: 0071.12: DEFINE_LIST_SORT unsorted 0.22(0.20+0.01) 0.21(0.19+0.01) 0071.14: DEFINE_LIST_SORT sorted 0.10(0.08+0.01) 0.10(0.08+0.01) 0071.16: DEFINE_LIST_SORT reversed 0.10(0.08+0.01) 0.10(0.08+0.01) Git SDK 64-bit on Windows 11 21H2 on Ryzen 7 5800H: 0071.12: DEFINE_LIST_SORT unsorted 0.54(0.00+0.06) 0.44(0.01+0.06) 0071.14: DEFINE_LIST_SORT sorted 0.21(0.03+0.03) 0.19(0.04+0.01) 0071.16: DEFINE_LIST_SORT reversed 0.21(0.01+0.04) 0.19(0.04+0.04) Debian bullseye on WSL2 on the same system: 0071.12: DEFINE_LIST_SORT unsorted 0.29(0.27+0.01) 0.22(0.19+0.02) 0071.14: DEFINE_LIST_SORT sorted 0.07(0.06+0.01) 0.06(0.04+0.02) 0071.16: DEFINE_LIST_SORT reversed 0.07(0.04+0.03) 0.06(0.04+0.02) Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
test-advise.c | ||
test-bitmap.c | ||
test-bloom.c | ||
test-chmtime.c | ||
test-config.c | ||
test-crontab.c | ||
test-csprng.c | ||
test-ctype.c | ||
test-date.c | ||
test-delta.c | ||
test-dir-iterator.c | ||
test-drop-caches.c | ||
test-dump-cache-tree.c | ||
test-dump-fsmonitor.c | ||
test-dump-split-index.c | ||
test-dump-untracked-cache.c | ||
test-example-decorate.c | ||
test-fake-ssh.c | ||
test-fast-rebase.c | ||
test-fsmonitor-client.c | ||
test-genrandom.c | ||
test-genzeros.c | ||
test-getcwd.c | ||
test-hash-speed.c | ||
test-hash.c | ||
test-hashmap.c | ||
test-hexdump.c | ||
test-index-version.c | ||
test-json-writer.c | ||
test-lazy-init-name-hash.c | ||
test-match-trees.c | ||
test-mergesort.c | ||
test-mktemp.c | ||
test-oid-array.c | ||
test-oidmap.c | ||
test-oidtree.c | ||
test-online-cpus.c | ||
test-pack-mtimes.c | ||
test-parse-options.c | ||
test-parse-pathspec-file.c | ||
test-partial-clone.c | ||
test-path-utils.c | ||
test-pcre2-config.c | ||
test-pkt-line.c | ||
test-prio-queue.c | ||
test-proc-receive.c | ||
test-progress.c | ||
test-reach.c | ||
test-read-cache.c | ||
test-read-graph.c | ||
test-read-midx.c | ||
test-ref-store.c | ||
test-reftable.c | ||
test-regex.c | ||
test-repository.c | ||
test-revision-walking.c | ||
test-run-command.c | ||
test-scrap-cache-tree.c | ||
test-serve-v2.c | ||
test-sha1.c | ||
test-sha1.sh | ||
test-sha256.c | ||
test-sigchain.c | ||
test-simple-ipc.c | ||
test-strcmp-offset.c | ||
test-string-list.c | ||
test-submodule-config.c | ||
test-submodule-nested-repo-config.c | ||
test-subprocess.c | ||
test-tool.c | ||
test-tool.h | ||
test-trace2.c | ||
test-urlmatch-normalization.c | ||
test-userdiff.c | ||
test-wildmatch.c | ||
test-windows-named-pipe.c | ||
test-write-cache.c | ||
test-xml-encode.c |