Re: [PATCH 5/5] fetch-pack: avoid quadratic loop in filter_refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 22, 2012, 20:16 UTC
- Message-ID
- <7v396s3ra5.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120521222329.GE22914@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> We have a list of refs that we want to compare against the > "match" array. The current code searches the match list > linearly, giving quadratic behavior over the number of refs > when you want to fetch all of them. > > Instead, we can compare the lists as we go, giving us linear > behavior. > > Signed-off-by: Jeff King <peff@peff.net>
Nice. Thanks.