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

Re: first bisection step takes quite a while

From
Christian Couder <christian.couder@gmail.com>
Date
Feb 21, 2025, 23:06 UTC
Message-ID
<CAP8UFD0xsZWDnH9kLJ4eWfzq4nvAm+qMHcdbZSf0d4-yPG9+5g@mail.gmail.com>
In-Reply-To
<CAP8UFD3EpwK3edfBfqRWmcncRFG--Q-yHR=K1wZnDHJs56ZipA@mail.gmail.com>

On Fri, Feb 21, 2025 at 9:24 PM Christian Couder <christian.couder@gmail.com> wrote:

>
> On Fri, Feb 21, 2025 at 6:47 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> > >>  * The "this is good enough" logic currently allows us to be within
> > >>    0.1% of the real halfway point.  Until the candidate set becomes
> > >>    small enough, we could loosen the criteria to allow larger, say
> > >>    3%, slack.  This code is written but not enabled (with "0 &&").
> >
> > The above follows the same reasoning why we chose "division by 1024"
> > in the first place.  The illustration patch postulates that we could
> > be way more aggressive than 0.1% while the set is large by dividing
> > 64, without wanting to loosen the criteria near the end of the
> > bisection session when the remaining set is reasonably small like
> > 1000 commits.  So we cannot rely on integer division truncating.
>
> The code you posted above uses 10000 as the threshold, not 1000:
>
> 10000 < nr && abs(diff) < nr / 64) || abs(diff) < nr / 1024)

Also if "division by 1024" means within 0.1% of the real halfway point, then division by 64 means 0.1 * 1024 / 64 = 1.6 % not 3%.

Previous: Christian CouderNext: Junio C Hamano
Message 8 of 12 in “first bisection step takes quite a while”
  1. Uwe Kleine-KönigFeb 20, 2025
  2. D. Ben KnobleFeb 20, 2025
  3. Junio C HamanoFeb 20, 2025
  4. Junio C HamanoFeb 21, 2025
  5. Christian CouderFeb 21, 2025
  6. Junio C HamanoFeb 21, 2025
  7. Christian CouderFeb 21, 2025
  8. Christian CouderFeb 21, 2025
  9. Junio C HamanoFeb 22, 2025
  10. D. Ben KnobleFeb 24, 2025
  11. Uwe Kleine-KönigFeb 21, 2025
  12. Junio C HamanoFeb 21, 2025

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.