unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 44529@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#44529: [PATCH] Convert apropos-internal from C to Lisp
Date: Mon, 09 Nov 2020 18:02:00 +0200	[thread overview]
Message-ID: <83tuty4iyv.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=QLXTUiDPS12keQSO4D7EUxgGsLY39+q1jvQAtfODvNw@mail.gmail.com> (message from Stefan Kangas on Mon, 9 Nov 2020 02:38:59 -0800)

> From: Stefan Kangas <stefan@marxist.se>
> Date: Mon, 9 Nov 2020 02:38:59 -0800
> Cc: monnier@iro.umontreal.ca
> 
> > I discovered that apropos-internal is defined in keymap.c for a reason
> > that escapes me (it really should be moved to apropos.el).
> 
> Yes.  So I was actually going to propose the attached patch.  In my
> testing, it is as fast as the C version (especially when byte-compiled),
> which would match my intuition from reading the code.
> 
> (benchmark-run 10
>   (apropos-command "test"))
> => (0.12032415399999999 2 0.014772391999999995) ; C
> => (0.13513192100000002 2 0.017216643000000004) ; Lisp
> 
> (benchmark-run 10
>   (apropos "x"))
> => (3.846117816 131 1.092690677) ; C
> => (4.218219444 145 1.2153865740000003) ; Lisp

20% slowdown is not negligible, at least not in principle.  Let's wait
for more people to voice their opinions on this aspect.

> Any comments or objections?

A bother: apropos.el is not preloaded, so please double-check that
none of the preloaded files call apropos-internal, otherwise that
would mean we need to preload apropos.el, which I think is
undesirable.

Thanks.





  parent reply	other threads:[~2020-11-09 16:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 10:38 bug#44529: [PATCH] Convert apropos-internal from C to Lisp Stefan Kangas
2020-11-09 13:51 ` Stefan Monnier
2020-11-09 16:02 ` Eli Zaretskii [this message]
2020-11-09 20:44   ` Stefan Kangas
2020-11-10  3:27     ` Eli Zaretskii
2020-11-10 13:14       ` Stefan Monnier
2020-11-10 16:01         ` Eli Zaretskii
2020-11-10 19:50           ` Stefan Monnier
2020-11-10 20:08             ` Eli Zaretskii
2020-11-16  1:07               ` Stefan Kangas
2020-11-16 17:52                 ` Eli Zaretskii
2020-11-25  1:57                   ` Stefan Kangas
2020-12-19 18:02                   ` Stefan Kangas

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tuty4iyv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=44529@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefan@marxist.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).