summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-11 20:51:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-12 22:17:42 (GMT)
commit94e99012fc7a02c5504214294279fa49b4cc8ce3 (patch)
tree6d60fd9cd99b5ea19a3fc9a32e48bcd74342fc42 /utf8.c
parent17966c0a63d25b1cc2dd1e98d30873e643bd581f (diff)
downloadgit-94e99012fc7a02c5504214294279fa49b4cc8ce3.zip
git-94e99012fc7a02c5504214294279fa49b4cc8ce3.tar.gz
git-94e99012fc7a02c5504214294279fa49b4cc8ce3.tar.bz2
http-walker: reduce O(n) ops with doubly-linked list
Using the a Linux-kernel-derived doubly-linked list implementation from the Userspace RCU library allows us to enqueue and delete items from the object request queue in constant time. This change reduces enqueue times in the prefetch() function where object request queue could grow to several thousand objects. I left out the list_for_each_entry* family macros from list.h which relied on the __typeof__ operator as we support platforms without it. Thus, list_entry (aka "container_of") needs to be called explicitly inside macro-wrapped for loops. The downside is this costs us an additional pointer per object request, but this is offset by reduced overhead on queue operations leading to improved performance and shorter queue depths. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'utf8.c')
0 files changed, 0 insertions, 0 deletions