mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 06:02:19 +00:00
![]() Drop the GLibc implementation of Merge Sort and replace it with Timsort. The algorithm has been tuned to work on arrays of pointers (void **), so there's no longer a need to abstract the byte-width of each element in the array. All the comparison callbacks now take pointers-to-elements, not pointers-to-pointers, so there's now one less level of dereferencing. E.g. int index_cmp(const void *a, const void *b) { - const git_index_entry *entry_a = *(const git_index_entry **)(a); + const git_index_entry *entry_a = (const git_index_entry *)(a); The result is up to a 40% speed-up when sorting vectors. Memory usage remains lineal. A new `bsearch` implementation has been added, whose callback also supplies pointer-to-elements, to uniform the Vector API again. |
||
---|---|---|
.. | ||
resources | ||
.gitignore | ||
NAMING | ||
t00-core.c | ||
t01-data.h | ||
t01-rawobj.c | ||
t02-data.h | ||
t02-objread.c | ||
t02-oids.h | ||
t03-objwrite.c | ||
t04-commit.c | ||
t05-revwalk.c | ||
t06-index.c | ||
t07-hashtable.c | ||
t08-tag.c | ||
t09-tree.c | ||
t10-refs.c | ||
t12-repo.c | ||
t13-threads.c | ||
t15-config.c | ||
t16-remotes.c | ||
test_helpers.c | ||
test_helpers.h | ||
test_lib.c | ||
test_lib.h | ||
test_main.c | ||
tests.supp |