git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] unpack-trees: fix accidentally quadratic behavior

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2016, 21:06 UTC
Message-ID
<xmqqbn8ey75h.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1453409984.16226.46.camel@twopensource.com>
David Turner <dturner@twopensource.com> writes:
Show 8 quoted lines
>> 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.

Previous: David Turner
Message 6 of 6 in “unpack-trees: fix accidentally quadratic behavior”
  1. unpack-trees: fix accidentally quadratic behaviorDavid Turner, Jan 21, 2016
  2. Junio C HamanoJan 21, 2016
  3. David TurnerJan 21, 2016
  4. Junio C HamanoJan 21, 2016
  5. David TurnerJan 21, 2016
  6. Junio C HamanoJan 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.