Subject: bug#79265: [PATCH] Treat point more consistently in PCM completion, [PATCH] Treat point more consistently in PCM completion

From: Stefan Monnier <[email-masked]>
Date: Sun, 24 Aug 2025 03:27:12 -0400

> Two things:
>
> - It should have somewhat better performance because we're running
> try-completion on smaller strings and therefore doing less string
> comparison and work.

Do we have concrete evidence to believe this?

> CCS previously contained, for each completion, a list containing one
> element for each wildcard element of PATTERN.
>
> Now CCS contains, for each completion, a list containing one element for
> each element of PATTERN, both fixed strings and wildcards.

Exactly: that means CCS is more costly to build and AFAICT it also
implies correspondingly more calls to `try-completion`.

I don't find it obvious that the new code will be more efficient.
Barring any clear evidence that one of the two versions is noticeably
more efficient than the other, I'd recommend we stick to the code we
happen to have.

>From where I stand, my impression is that neither version is terribly
better nor terribly worse than the other, in terms of clarity,
simplicity, and efficiency.

        Stefan

PS: BTW, there's currently a limit of 255 subgroups in regexps, which
for `flex` currently implies a limit of 254 chars and with your patch
that limit would be halved.