GNU bug report logs -
#79035
Remove micro-optimization for Funintern for performance
Previous Next
Full log
Message #29 received at 79035 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Jul 17, 2025 at 6:12 PM Lynn Winebarger <owinebar <at> gmail.com> wrote:
>
> On Thu, Jul 17, 2025, 2:51 PM Mattias Engdegård <mattias.engdegard <at> gmail.com> wrote:
>>
>> 17 juli 2025 kl. 17.09 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:
>>
>> > Yeah, this static var is ugly, I'm in favor of removing it.
>>
>> Same here. I don't think it was ever meant as an optimisation, just a quick and lazy way to implement Funintern.
>>
>> > BTW, looking at the code of `Funintern` I get the impression that
>> > `oblookup_considering_shorthand` is wrong when the argument is a symbol:
>> > we should take shorthand into account only when passed a string.
>>
>> Right. Funintern isn't often used but we could do a better job here.
>
>
> Well, I certainly have no opinion on the finer points of the semantics. I only tried to eliminate the unnecessary global state without altering the behavior.
> Since I've worked out (with Pip Cet's help) the undocumented contracts with debug and elisp-mode, I'm going to be going through the rest of my patch to rebase it on your recent commits in a more incremental series of changes. There are some other random bits of detritus in lread that I plan to submit separately from the main patch, just to simplify the larger task a bit.
> Would you (Mattias and Stefan) prefer I submit these bits as a single bug or one bug per change?
>
Since I haven't heard back, I'm just going to revise the patch set
here. One of the bits I thought was detritus actually depended on one
of the other changes I had made in lread.c, so I only have 2 small
additional changes. The commit messages are detailed.
0002-Remove-unreferenced-internal-variable.patch eliminates the unused
variable load_convert_to_unibyte and associated unwind-protect.
0003-Move-read-char-and-friends-to-keyboard.c.patch cleans up lread.c
by grouping read-char et al with read-key-sequence in keyboard.c.
Running make check shows no additional failures compared to the baseline.
Lynn
[0002-Remove-unreferenced-internal-variable.patch (text/x-patch, attachment)]
[0001-Remove-micro-optimization-for-Funintern.patch (text/x-patch, attachment)]
[0003-Move-read-char-and-friends-to-keyboard.c.patch (text/x-patch, attachment)]
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.