Re: [PATCH] describe: Don’t look up commits with --exact-match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:
> Anders Kaseorg wrote:
> > On Fri, 3 Dec 2010, Jonathan Nieder wrote:
> 
> >> Instead of looking up the commit to be matched exactly in the commits
> >> hash table, this makes a linear search.
> [...]
> > I donât think itâs ever a problem: in my repository with 1800 tags on a 
> > warm cache, that loop accounts for about 0.1% of even the fastest 
> > non-exact-match query (a commit right after a tag).
> 
> Thanks for checking.  Makes sense.

Apart from measuring: for_each_ref *loads* the tags in a linear scan,
so another linear scan doesn't add to the runtime w.r.t. number of
tags.  It only hurts if you also describe many refs in one go.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]