From: Jeff King Date: Wed, 03 Oct 2007 16:59:27 GMT Subject: Re: What's cooking in git.git (topics) Message-ID: <20071003165927.GA25055@coredump.intra.peff.net> In-Reply-To: <85641oy5ge.fsf@lola.goethe.zz> On Wed, Oct 03, 2007 at 10:20:49AM +0200, David Kastrup wrote: > Part of the reason is that it is not actually what I had in mind. Why > create the hash array as a hash array? Filling the hash array in > basically random order, then sort+compressing it is what is causing > much of the costs. My idea was to just fill the "hash array" > linearly. It is quite pointless (and certainly very inefficient with > regard to cache poisoning) to do it in hash order when we are going to > sort it anyway. Try profiling the code, and you will see that the creation of the hashes is totally dwarfed by the comparisons. So yes, you might be able to speed up the creation code, but it's going to have a minimal impact on the overall run time. -Peff