All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Jessica Clarke <jrtc27@jrtc27.com>, git@vger.kernel.org
Subject: Re: [PATCH] apply: Avoid ambiguous pointer provenance for CHERI/Arm's Morello
Date: Fri, 07 Jan 2022 16:51:57 -0800	[thread overview]
Message-ID: <xmqqsftz3v82.fsf@gitster.g> (raw)
In-Reply-To: <4f05f434-7bd1-d563-94bd-607858deb1f8@web.de> ("René Scharfe"'s message of "Sat, 8 Jan 2022 01:04:23 +0100")

René Scharfe <l.s.r@web.de> writes:

>>> 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.

  reply	other threads:[~2022-01-08  0:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 13:23 [PATCH] apply: Avoid ambiguous pointer provenance for CHERI/Arm's Morello Jessica Clarke
2022-01-05 16:39 ` Konstantin Khomoutov
2022-01-05 16:40   ` Jessica Clarke
2022-01-06 22:50 ` Taylor Blau
2022-01-06 22:57   ` Jessica Clarke
2022-01-06 22:53 ` Junio C Hamano
2022-01-06 23:02   ` Jessica Clarke
2022-01-06 23:41     ` Junio C Hamano
2022-01-07 12:16   ` René Scharfe
2022-01-07 13:00     ` Jessica Clarke
2022-01-07 19:40     ` Junio C Hamano
2022-01-08  0:04       ` René Scharfe
2022-01-08  0:51         ` Junio C Hamano [this message]
2022-01-07 23:25     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsftz3v82.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrtc27@jrtc27.com \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.