unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44529@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#44529: [PATCH] Convert apropos-internal from C to Lisp
Date: Mon, 9 Nov 2020 12:44:26 -0800	[thread overview]
Message-ID: <CADwFkmkTQfCrVw7n=1g_8zhgXnv1E53mL_40oaLi3HJ3Umt6JQ@mail.gmail.com> (raw)
In-Reply-To: <83tuty4iyv.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> (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.

Unless I'm missing something, the slowdown should be around 10%.

(FWIW, the figure of 0.38 or 0.42 seconds is for the more unlikely
string with one character.  In the more realistic scenario with a
slightly longer string, we see a difference between 0.012 and 0.013
seconds.)

> 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.

I only see one call in a preloaded file:

./lisp/progmodes/elisp-mode.el:873: (dolist (sym (apropos-internal regexp))

(This is from a `cl-defmethod' for `xref-backend-apropos'.)

Does this mean we have to preload apropos.el?  I don't understand how,
so I'm probably missing something.

Thanks for commenting.





  reply	other threads:[~2020-11-09 20:44 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
2020-11-09 20:44   ` Stefan Kangas [this message]
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='CADwFkmkTQfCrVw7n=1g_8zhgXnv1E53mL_40oaLi3HJ3Umt6JQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=44529@debbugs.gnu.org \
    --cc=eliz@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 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).