all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 28625@debbugs.gnu.org
Subject: bug#28625: [PROPOSED] Speed up (format "%s" STRING) and the like
Date: Fri, 29 Sep 2017 18:48:51 +0300	[thread overview]
Message-ID: <83tvzl7bfg.fsf@gnu.org> (raw)
In-Reply-To: <20170927185212.1846-1-eggert@cs.ucla.edu> (message from Paul Eggert on Wed, 27 Sep 2017 11:52:12 -0700)

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 27 Sep 2017 11:52:12 -0700
> Cc: Paul Eggert <eggert@cs.ucla.edu>
> 
> Although the Lisp manual said that ‘format’ returns a
> newly-allocated string, this was not true for a few cases like
> (format "%s" ""), and fixing the documentation to allow reuse of
> arguments lets us improve performance in common cases like
> (format "foo") and (format "%s" "foo").
> * doc/lispref/strings.texi (Formatting Strings):
> * etc/NEWS:
> Say that the result of ‘format’ might not be newly allocated.
> * src/callint.c (Fcall_interactively):
> * src/dbusbind.c (XD_OBJECT_TO_STRING):
> * src/editfns.c (Fmessage, Fmessage_box):
> * src/xdisp.c (vadd_to_log, Ftrace_to_stderr):
> Just use Fformat or Fformat_message, as that’s simpler and no
> longer makes unnecessary copies.
> * src/editfns.c (styled_format): Remove last argument, as it
> is no longer needed: all callers now want it to behave as if it
> were true.  All remaining callers changed.  Make this function
> static again.  Simplify the function now that we no longer
> need to worry about whether the optimization is allowed.
> ---
>  doc/lispref/strings.texi | 10 +++++++---
>  etc/NEWS                 |  7 +++++++
>  src/callint.c            |  4 ++--
>  src/dbusbind.c           |  3 +--
>  src/editfns.c            | 26 ++++++++++----------------
>  src/lisp.h               |  1 -
>  src/xdisp.c              |  4 ++--
>  7 files changed, 29 insertions(+), 26 deletions(-)

Fine with me for the release branch.

Thanks.





  parent reply	other threads:[~2017-09-29 15:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 18:52 bug#28625: [PROPOSED] Speed up (format "%s" STRING) and the like Paul Eggert
2017-09-27 20:00 ` John Wiegley
2017-09-27 20:11   ` Paul Eggert
2017-09-27 21:33     ` John Wiegley
2017-09-27 23:33       ` Paul Eggert
2017-09-28  5:40         ` John Wiegley
2017-10-07  9:12           ` Philipp Stephani
2017-10-07  9:48             ` Eli Zaretskii
2017-10-07 10:56               ` Philipp Stephani
2017-10-07 11:34                 ` Eli Zaretskii
2017-09-28  1:47     ` Noam Postavsky
2017-09-29 15:48 ` Eli Zaretskii [this message]
2017-10-04 21:45   ` Paul Eggert

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tvzl7bfg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28625@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.