unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: emacs-devel@gnu.org
Subject: Merging scratch/substitute-command-keys to master
Date: Sat, 17 Oct 2020 14:03:25 +0000	[thread overview]
Message-ID: <CADwFkmmGH33kxiiYfG6xHzdgNVoO0CK9Z+2pEjs=TotL1LfwLA@mail.gmail.com> (raw)

I've been working on translating `substitute-command-keys' from C to
Lisp, and I think it's getting ready to merge to master.  Please see the
branch scratch/substitute-command-keys.

Note that this is a rather close 1 to 1 translation from C to Lisp, so
there should also exist many opportunities to take better advantage of
a more expressive language.

One obvious concern is performance.  Here is what I've used to
benchmark it:

(with-temp-buffer
    (dired-mode)
    (let* ((times 100)
           (result (benchmark-run times
                     (documentation 'dired-mode))))
      (cl-mapcar '/ result (make-list 3 (float times)))))

Old C version:     (0.02171680510 0.2  0.01730526807)
New Lisp version:  (0.02775125134 0.24 0.01882684842)

[It would be useful if someone could help verify the above results.]

I hope the above figures are acceptable.  Hopefully, we will be able
to improve the implementation to be more performant over time.

Finally, note that I didn't yet rip out the old C code, and that the
branch is currently based on the master branch from May.

Thanks in advance for any comments and reviews.

(BTW, do we generally merge branches as-is with their full history or do
we squash them and push as a single commit?)



             reply	other threads:[~2020-10-17 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 14:03 Stefan Kangas [this message]
2020-10-17 15:05 ` Merging scratch/substitute-command-keys to master Eli Zaretskii
2020-10-17 16:19 ` Stefan Monnier
2020-10-17 23:35   ` Stefan Kangas
2020-10-18  4:09     ` Stefan Monnier
2020-10-18 11:42       ` Stefan Kangas
2020-10-18 16:11     ` Stefan Kangas
2020-10-17 17:22 ` Drew Adams
2020-10-17 17:46   ` 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='CADwFkmmGH33kxiiYfG6xHzdgNVoO0CK9Z+2pEjs=TotL1LfwLA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=emacs-devel@gnu.org \
    /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).