summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2021-03-30 11:04:36 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-01 13:07:37 -0700
commit30077524611cae8f25111e2c8b8d42136aa58787 (patch)
tree3f2baaf6817d22018f5d999dd3e70f37d2de57a2 /t/README
parentpack-revindex: write multi-pack reverse indexes (diff)
downloadtgif-30077524611cae8f25111e2c8b8d42136aa58787.tar.xz
midx.c: improve cache locality in midx_pack_order_cmp()
There is a lot of pointer dereferencing in the pre-image version of 'midx_pack_order_cmp()', which this patch gets rid of. Instead of comparing the pack preferred-ness and then the pack id, both of these checks are done at the same time by using the high-order bit of the pack id to represent whether it's preferred. Then the pack id and offset are compared as usual. This produces the same result so long as there are less than 2^31 packs, which seems like a likely assumption to make in practice. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/README')
0 files changed, 0 insertions, 0 deletions