unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: emacs-devel@gnu.org
Subject: Re: please review new branch feature/byte-unwind-protect
Date: Tue, 23 Jan 2018 08:50:33 -0700	[thread overview]
Message-ID: <87zi54ing6.fsf@tromey.com> (raw)
In-Reply-To: <m27es9nepu.fsf@newartisans.com> (John Wiegley's message of "Tue,  23 Jan 2018 00:47:57 -0800")

>>>>> "John" == John Wiegley <johnw@gnu.org> writes:

>>>>> "TT" == Tom Tromey <tom@tromey.com> writes:
TT> I recently wrote a couple of patches to add two new bytecodes to Emacs.
TT> These make it possible to compile unwind-protect without the need to
TT> introduce a closure for the unwind forms.

John> Hi Tom,

John> Thanks for these changes. I just want to ask: what motivates them?  Is it
John> efficiency? Does it enable something you can't achieve otherwise? If the
John> former, has it been measured? What is the corresponding cost of having this
John> change?

It's partly for efficiency -- I didn't benchmark it though.  I suppose I
can.  It's pretty normal to see unwind-protect in the expansion of
macros, though; there are plenty in subr.el.  This enables better code
generation in the jit I've written (I plan to post about that when it's
ready but I can do it sooner if you want).

Also this seems like an un-finished to-do item from the lexical binding
conversion.

I don't think there's a cost to this change.  It uses two byte codes,
but there are still some to spare, so I think it isn't a big deal.

Tom



  reply	other threads:[~2018-01-23 15:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  5:20 please review new branch feature/byte-unwind-protect Tom Tromey
2018-01-23  8:47 ` John Wiegley
2018-01-23 15:50   ` Tom Tromey [this message]
2018-01-23 16:37     ` Stefan Monnier
2018-01-27 17:37 ` Markus Triska
2018-01-27 21:28   ` Stefan Monnier
2018-02-03 19:43 ` Philipp Stephani
  -- strict thread matches above, loose matches on Subject: below --
2018-01-26  7:58 Rocky Bernstein

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=87zi54ing6.fsf@tromey.com \
    --to=tom@tromey.com \
    --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).