src/tsort.c


Log

Author Commit Date CI Message
schu 5e0de328 2012-02-13T17:10:24 Update Copyright header Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti 3286c408 2011-10-28T14:51:13 global: Properly use `git__` memory wrappers Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
Vicent Marti 87d9869f 2011-09-19T03:34:49 Tabify everything There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
Vicent Marti bb742ede 2011-09-19T01:54:32 Cleanup legal data 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
schu b6817692 2011-08-17T12:14:47 tsort.c: fix include of common.h Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti c2db984b 2011-07-09T13:27:08 tsort: Remove unused CLZ methods
nulltoken ae2e4c6a 2011-07-09T08:41:02 win32: replace usage of _MSV_VER with _MSC_VER
schu d4cb0ee8 2011-07-07T18:14:53 tsort: remove unused but set variable Signed-off-by: schu <schu-github@schulog.org>
nulltoken 417a581d 2011-07-07T13:38:47 tsort: fix wrong header inclusion
nulltoken bdcc4611 2011-07-07T10:11:00 Fix MSVC compilation warnings
Vicent Marti de18f276 2011-07-07T01:46:20 vector: Timsort all of the things 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.