Re: [PATCH 8/6] commit: use generation numbers for in_merge_bases()
- From
Jeff King <peff@peff.net>
- Date
- Apr 4, 2018, 18:59 UTC
- Message-ID
- <20180404185950.GF9055@sigill.intra.peff.net>
- In-Reply-To
- <aa28c3e5-7645-ffe0-78a3-e3cbd2ea8cec@gmail.com>
On Wed, Apr 04, 2018 at 02:53:45PM -0400, Derrick Stolee wrote:
Show 8 quoted lines
> > I'd have to do some timings, but I suspect we may want to switch to the > > "tag --contains" algorithm anyway. This still does N independent > > merge-base operations, one per ref. So with enough refs, you're still > > better off throwing it all into one big traversal. > > ...and I suppose your timings are to find out if there are data shapes where > the branch algorithm is faster. Perhaps that is impossible now that we have > the generation number cutoff for the tag algorithm.
Well, I wanted to show the opposite: that the branch algorithm can still perform quite poorly. :)
I think with generation numbers that the tag algorithm should always perform better, since you can't walk past a merge base when using a cutoff. But it could definitely perform worse in a case where you don't have generation numbers.
> Patches 7 and 8 seem to me like simple changes with no downside UNLESS we > are deciding instead to delete the code I'm changing.
Yeah, I think they are strict improvements modulo the inverted UNDEF logic I mentioned.
-Peff