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

Re: [PATCH v3 1/3] Introduce sorted-array binary-search function.

From
YDYann Dirson <ydirson@free.fr>
Date
Nov 16, 2010, 22:04 UTC
Message-ID
<20101116220418.GA3187@home.lan>
In-Reply-To
<7vy68ti3gr.fsf@alter.siamese.dyndns.org>
On Tue, Nov 16, 2010 at 09:27:16AM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> Yann Dirson <ydirson@altern.org> writes:
> 
> > We use a cpp-based template mechanism to declare the array and its
> > management data, as well as a search function, derived from locate_rename_dst()
> > from diffcore-rename.c.  Thanks to Jonathan Nieder for this design idea.
> 
> Hmmm.... Yet another binary search...
Well, not exactly another, it still generalizes code that was already here.
> Can we generalize the existing ones first before adding any of this in
> (hint: look for "git grep -w -e hi --and -e lo")?

With great pleasure. I have simply missed those, only looking for the pattern used in diffcore-rename.

Looking at a few ones, that seems just a matter of:
* refreshing my "[RFC] Add a sorted-list API for use-cases that
  require to get the element index." from v2 series
* adding support for more than one func, which I already required for
  bulk-rename
Previous: Junio C HamanoNext: Yann Dirson
Message 4 of 6 in “generalizing sorted-array handling”
  1. generalizing sorted-array handlingYann Dirson, Nov 8, 2010
  2. 1/3 Introduce sorted-array binary-search function.Yann Dirson, Nov 8, 2010
  3. Junio C HamanoNov 16, 2010
  4. Yann DirsonNov 16, 2010
  5. 2/3 Separate sorted-array type declaration from array declaration.Yann Dirson, Nov 8, 2010
  6. 3/3 Convert diffcore-rename's rename_src to the new sorted-array API.Yann Dirson, Nov 8, 2010

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.