GNU bug report logs -
#44529
[PATCH] Convert apropos-internal from C to Lisp
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Mon, 9 Nov 2020 10:40:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 44529 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Mon, 9 Nov 2020 02:38:59 -0800
> Cc: monnier <at> 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.
This bug report was last modified 4 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.