help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance of String Operations


From: Colin S. Miller
Subject: Re: Performance of String Operations
Date: Sun, 11 Oct 2009 15:40:07 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]