]> git.ipfire.org Git - thirdparty/git.git/commit - fast-import.c
fast-import: insert new object entries at start of hash bucket
authorDavid Barr <david.barr@cordelta.com>
Tue, 23 Nov 2010 07:53:48 +0000 (01:53 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 19:25:16 +0000 (11:25 -0800)
commitb7c1ce4f14f37600a8a5bf8d81e0a723d42644b9
tree51d785acce4edf3fd79dcd11eb50d4b282551c4f
parent593ce2bea5dad436e87b5dd37c205961d73feae9
fast-import: insert new object entries at start of hash bucket

More often than not, find_object is called for recently inserted objects.
Optimise for this case by inserting new entries at the start of the chain.
This doesn't affect the cost of new inserts but reduces the cost of find
and insert for existing object entries.

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c