[erlang-questions] String continuation
Raimo Niskanen
raimo+erlang-questions@REDACTED
Fri Jan 14 09:37:25 CET 2011
On Thu, Jan 13, 2011 at 09:16:23PM +0000, Robert Virding wrote:
> ----- "Ulf Wiger" <ulf.wiger@REDACTED> wrote:
>
> > On 13 Jan 2011, at 19:07, Evgeniy Khramtsov wrote:
> >
> > > ++ operator is slow. It is better to use dialyzer in order to track
> > such errors.
> >
> >
> > Efficiency Guide, Chapter 2.4 - Myth: '++' is always bad
> > http://erlang.org/doc/efficiency_guide/myths.html#id54761
>
> It gets even better. The compiler will at compile time optimise "string3" ++ "string4" to "string3string4". So:
>
> "string3" "string4" --> "string3string4" during parsing
> "string3" ++ "string4" --> "string3string4" during compiling
And, "string3"++A is optimised into [$s,$t,$r,$i,$n,$g,$3|A].
>
> There is no escape.
>
> Robert
>
> --
> Robert Virding, Erlang Solutions Ltd.
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list