From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Performance of String Operations
Date: Sun, 11 Oct 2009 15:40:07 +0100 [thread overview]
Message-ID: <4ad1ee45$0$293$14726298@news.sunsite.dk> (raw)
In-Reply-To: <e6535800-cf57-4329-a392-4210959abab4@l13g2000yqb.googlegroups.com>
Nordlöw wrote:
> Does Emacs contain append/prepend/concat functions for strings that
> modify one of its (first) arguments (for side effects only)?
>
> If so, why not?: Isn't such a function crucial to the performance of a
> language, regarding that strings is such a common object type?
>
> Or does the Emacs compiler optimize such things? Can I somehow
> investigate how Emacs has optimized my lisp code?
>
> /Nordlöw
Nordlöw,
do you mean instead of
(setq a (concat a b c))
you can use
(concat-inplace 'a b c)
?
I don't think lisp supports the second style.
To support it, either all strings have to be over-allocated,
or atleast have space after them for growth.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
next prev parent reply other threads:[~2009-10-11 14:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 6:41 Performance of String Operations Nordlöw
2009-10-11 10:05 ` Xah Lee
2009-10-11 14:40 ` Colin S. Miller [this message]
2009-10-11 15:38 ` Helmut Eller
2009-10-11 17:29 ` Pascal J. Bourguignon
2009-10-11 20:58 ` John A Pershing Jr
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='4ad1ee45$0$293$14726298@news.sunsite.dk' \
--to=no-spam-thank-you@csmiller.demon.co.uk \
--cc=help-gnu-emacs@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 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.