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.