[erlang-questions] string concatenation efficiency

Richard Carlsson <>
Thu Jan 28 12:24:57 CET 2016


Note that ++ is just an operator alias for lists:append/2.


        /Richard

2016-01-28 8:22 GMT+01:00 Khitai Pang <>:

> Hi,
>
> For string concatenation, which one of the following is the most efficient?
>
> 1)
> strings:join(["Item:{", ItemID, "}")], ""]
>
> 2)
> lists:append(["Item:{", ItemID, "}")])
>
> 3)
> "Item:{" ++ ItemID ++ "}"
>
> Here ItemID is a UUID.
>
>
> Thanks
> Khitai
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160128/d7ba0b71/attachment.html>


More information about the erlang-questions mailing list