packfile: use DEFINE_LIST_SORT
commit9b9f5f6217a5178e348dc2e18bc6af7158b97c36
authorRené Scharfe <l.s.r@web.de>
Sat, 16 Jul 2022 17:01:18 +0000 (16 19:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Jul 2022 22:20:39 +0000 (17 15:20 -0700)
treea5593fdd08bf48a20a146adf69c3f62f26fec994
parent6fc9fec07bcaa6561aff5b485f1ac581f97a2428
packfile: use DEFINE_LIST_SORT

Build a typed sort function for packed_git lists using DEFINE_LIST_SORT
instead of calling llist_mergesort().  This gets rid of the next pointer
accessor functions and their calling overhead at the cost of slightly
increased object text size.

Before:
__TEXT __DATA __OBJC others dec hex
20218 320 0 110936 131474 20192 packfile.o

With this patch:
__TEXT __DATA __OBJC others dec hex
20430 320 0 112619 133369 208f9 packfile.o

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c