GNU bug report logs - #79265
[PATCH] Treat point more consistently in PCM completion

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Mon, 18 Aug 2025 18:54:01 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Full log


Message #43 received at 79265 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 79265 <at> debbugs.gnu.org
Subject: Re: bug#79265: [PATCH] Treat point more consistently in PCM
 completion, [PATCH] Treat point more consistently in PCM completion
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.





This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.