Re: [PATCH] Introduce get_octopus_merge_bases() in commit.c
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 9, 2008, 23:08 UTC
- Message-ID
- <alpine.DEB.1.00.0806100006140.1783@racer>
- In-Reply-To
- <7vd4mqfcb0.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 9 Jun 2008, Junio C Hamano wrote:
Show 8 quoted lines
> Miklos Vajna <vmiklos@frugalware.org> writes: > > > Exactly. I modified merge_bases_many() to use a commit list. > > I just looked at your f755fb6; from the point of view of merge_bases() > which is far more often used, I think this is not an improvement but > actively wrong thing to do. Most of the time callers compute merge base > of two, and the codepath should be optimized for that case.
But how much work is
struct commit_list list = { two, NULL };merge_bases_many(one, &list);
? merge_bases_many() does not modify the list IIRC, and it looks conceptually clean while being pretty much in the same performance ballpark.
Ciao, Dscho