[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A faster derived-mode-p
From: |
Óscar Fuentes |
Subject: |
Re: A faster derived-mode-p |
Date: |
Mon, 15 Feb 2021 00:03:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Dmitry Gutov <dgutov@yandex.ru> writes:
>
>> On 14.02.2021 22:22, Lars Ingebrigtsen wrote:
>>> There are only 11K commands in the Emacs tree, so I don't know whether
>>> the current default completion predicate is going to turn out to be
>>> problematically slow or not.
>>
>> I just evaluated
>>
>> (length (cl-delete-if-not #'commandp obarray))
>>
>> in a running Emacs session with a bunch of third-party packages installed and
>> loaded, and that still evaluated only to 1083.
>
> That's not counting the obarray's buckets. I get ~6x as many results in
> my session with (length (all-completions "" obarray #'commandp)).
~10000 here.
Can't we memoize derived-mode-p ? It doesn't look like something that
could take a lot of space.