From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 54802@debbugs.gnu.org
Subject: bug#54802: OClosure: Make `interactive-form` a generic function
Date: Sun, 10 Apr 2022 14:45:41 +0200 [thread overview]
Message-ID: <87k0bxp0ne.fsf@gnus.org> (raw)
In-Reply-To: <jwvy20fz55c.fsf@iro.umontreal.ca> (Stefan Monnier's message of "Fri, 08 Apr 2022 16:33:51 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> While the performance of `call-interactively` and `interactive-form` are
> not critical, `commandp` is a function that is occasionally used in
> tight loops (typically when filtering completions from `obarray`) so
> I refrained from making it into a generic function, and instead I make
> it defer to `interactive-form` when we counter what looks like an OClosure.
Makes sense to me.
> That keeps the common code as fast as before, tho it makes `commandp`
> slow(ish) when applied to interactive OClosures.
>
> Making `commandp` into a generic function would apparently slow down
> a loop like
>
> (mapatoms (lambda (s) (if (commandp s) (cl-incf count))))
>
> by a factor around 2x or 3x, which is not the end of the world but
> doesn't seem justified.
Yeah, we loop on commandp in a lot of contexts, so keeping it fast is
good.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-04-10 12:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 20:33 bug#54802: OClosure: Make `interactive-form` a generic function Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-09 5:58 ` Eli Zaretskii
2022-04-09 13:50 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-10 12:45 ` Lars Ingebrigtsen [this message]
2022-04-13 7:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-14 18:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 0:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 1:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 1:37 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 3:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 4:27 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 16:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15 16:14 ` Eli Zaretskii
2022-04-18 22:59 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-19 5:40 ` Eli Zaretskii
2022-04-19 12:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-19 12:43 ` Lars Ingebrigtsen
2022-04-19 13:00 ` Eli Zaretskii
2022-04-19 13:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-19 13:53 ` Eli Zaretskii
2022-04-19 14:53 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-19 16:35 ` Eli Zaretskii
2022-04-19 17:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-26 14:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-27 16:05 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-11 21:24 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-12 5:34 ` Eli Zaretskii
2022-06-12 20:56 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0bxp0ne.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=54802@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.