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

Re: [PATCH] apply: Avoid ambiguous pointer provenance for CHERI/Arm's Morello

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 8, 2022, 00:51 UTC
Message-ID
<xmqqsftz3v82.fsf@gitster.g>
In-Reply-To
<4f05f434-7bd1-d563-94bd-607858deb1f8@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 17 quoted lines
>>> Or strsets -- we only need two.
>>
>> True.
>>
>> When we check a path, we make a single look-up of two bit in a
>> single hashtable but now we need two look-ups, but addition, removal
>> and renaming of a symlink would be rare enough to matter either way.
>
> Hmm, symlinks changes are rare, but this only affects the register phase
> (which should be noticeably slow for the string_list based code with its
> O(n*log(n)) lookup per registered symlink if there were a lot of them).
> But the final lookups are done for each path _component_, of any file
> type.
>
> I suspect that two lookups in (sparsely populated) hash tables are still
> fast enough.  (At least I couldn't measure any difference with git apply
> and a patch between v2.33.0 and v2.34.0.)

Yup. I do not think it matters, and the resulting code is certainly a lot simpler and easier to read ;-)

Thanks.
Previous: René ScharfeNext: Junio C Hamano
Message 13 of 14 in “apply: Avoid ambiguous pointer provenance for CHERI/Arm's Morello”
  1. apply: Avoid ambiguous pointer provenance for CHERI/Arm's MorelloJessica Clarke, Jan 5, 2022
  2. Konstantin KhomoutovJan 5, 2022
  3. Jessica ClarkeJan 5, 2022
  4. Taylor BlauJan 6, 2022
  5. Jessica ClarkeJan 6, 2022
  6. Junio C HamanoJan 6, 2022
  7. Jessica ClarkeJan 6, 2022
  8. Junio C HamanoJan 6, 2022
  9. René ScharfeJan 7, 2022
  10. Jessica ClarkeJan 7, 2022
  11. Junio C HamanoJan 7, 2022
  12. René ScharfeJan 8, 2022
  13. Junio C HamanoJan 8, 2022
  14. Junio C HamanoJan 7, 2022

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.