From: Junio C Hamano Date: Wed, 01 May 2013 21:57:03 GMT Subject: Re: [PATCH] lookup_object: prioritize recently found objects Message-ID: <7vwqri4b4g.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130501203449.GA12535@sigill.intra.peff.net> Jeff King writes: > We could instead bump X into the `i` slot, and then shift > the whole contiguous chain down by one, resulting in: > > index | i-1 | i | i+1 | i+2 | > ----------------------------------- > entry ... | A | X | B | C | ... > ----------------------------------- > > That puts our chain in true most-recently-used order. > However, experiments show that it is not any faster (and in > fact, is slightly slower due to the extra manipulation). Makes quite a lot of sense to me. Very simple, clean and nice.