|
From: | Dmitry Gutov |
Subject: | Re: A faster derived-mode-p |
Date: | Mon, 15 Feb 2021 00:25:57 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
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.
So if derived-mode-p only needs to run 1000 times or so, perhaps it can still be fast enough, however inefficient it might look. I'd also recommend benchmarking with both implementations, if it's really too slow.
Also see the whole other implementation approach I mentioned in another thread.
[Prev in Thread] | Current Thread | [Next in Thread] |