public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: David Turner <dturner@twopensource•com>
Cc: git mailing list <git@vger•kernel.org>
Subject: Re: [PATCH] unpack-trees: fix accidentally quadratic behavior
Date: Thu, 21 Jan 2016 13:06:18 -0800	[thread overview]
Message-ID: <xmqqbn8ey75h.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1453409984.16226.46.camel@twopensource.com> (David Turner's message of "Thu, 21 Jan 2016 15:59:44 -0500")

David Turner <dturner@twopensource•com> writes:

>> The first break is correct, but I am not sure about the "else if"
>> part.  Shouldn't it be doing something similar to the logic to "keep
>> looking" that talks about "t-i", "t" and "t/a" at the end of the
>> loop?
>
> Rather than doing more complicated logic, let's just do the first
> check; it seems about as fast for our repo, and I think will usually be
> so.  does that seem reasonable to you?

Very reasonable.  I was mostly afraid of leaving the loop
prematurely and giving a wrong answer to the caller.

      reply	other threads:[~2016-01-21 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  4:05 [PATCH] unpack-trees: fix accidentally quadratic behavior David Turner
2016-01-21  4:58 ` Junio C Hamano
2016-01-21 19:09   ` David Turner
2016-01-21 19:51     ` Junio C Hamano
2016-01-21 20:59       ` David Turner
2016-01-21 21:06         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbn8ey75h.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=dturner@twopensource$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox