* Speeding up (format "%s" STRING)
@ 2017-09-27 20:13 Paul Eggert
0 siblings, 0 replies; only message in thread
From: Paul Eggert @ 2017-09-27 20:13 UTC (permalink / raw
To: Emacs development discussions
In Bug#28625 I propose changing the documentation for the 'format'
function so that it no longer states that 'format' returns a
newly-allocated string. This statement is already incorrect for cases
like (format "%s" ""), and removing the statement lets us improve the
performance for other cases such as (format "foo") and (format "%s"
"foo"). Although I doubt whether any code depends on 'format' always
returning a newly-allocated string for these cases, the proposed patch
does change the semantics of 'format' slightly, so I'm sending this
heads-up to emacs-devel to ask if anyone sees problems with it.
As noted in Bug#28625, on my old desktop (AMD Phenom II X4 910e), the
proposed patch speeds up (format "%s" "Hello, world!") by a factor of
about 9. It also causes Emacs to use less RAM (harder to measure) and
simplifies the Emacs source code.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-27 20:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 20:13 Speeding up (format "%s" STRING) Paul Eggert
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.