diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-10-18 00:02:55 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-10-18 17:25:23 +0200 |
commit | afde53cd81c7817c5b3187e60e7a49790e0af832 (patch) | |
tree | 93ea775eaa564b54793326f8dbee8209fbc6cecc /test/lisp/emacs-lisp/cl-print-tests.el | |
parent | 5ad2bb0fa95d9c9ae2387c963b453f695577450a (diff) | |
download | emacs-afde53cd81c7817c5b3187e60e7a49790e0af832.tar.gz emacs-afde53cd81c7817c5b3187e60e7a49790e0af832.tar.bz2 emacs-afde53cd81c7817c5b3187e60e7a49790e0af832.zip |
Improve substitute-command-keys performance
The previous conversion of describe_vector from C to Lisp for the
keymap and char table case lead to an unacceptable performance hit.
Moving back to the C version, as we do here, makes this function
around 50 times faster.
The Lisp version of `substitute-command-keys' was benchmarked using
the form `(documentation 'dired-mode)', which now takes less than 8 ms
on my machine. This is around 16 times slower than the previous C
version.
Thanks to Stefan Monnier for helpful pointers on benchmarking.
* src/keymap.c (Fhelp__describe_vector): New defun to expose
describe_vector to Lisp for keymaps and char tables.
(syms_of_keymap): New defsubr for Fhelp__describe_vector.
* lisp/help.el (describe-map): Use above defun instead of Lisp
version.
(help--describe-vector): Remove defun; keep it commented out for now.
Diffstat (limited to 'test/lisp/emacs-lisp/cl-print-tests.el')
0 files changed, 0 insertions, 0 deletions