[erlang-questions] Which is best? string:concat or ++?

Paul Barry paul.james.barry@REDACTED
Mon May 7 17:39:09 CEST 2012


Thanks for all of that, folks.

If there are any other newbies out there wanting to know more about
IOlists (which are "missing" from my copies of  "Programming Erlang"
as well as "Erlang Programming"), here's a couple of links that I
found that do a good job of describing same:

    http://dev.af83.com/2012/01/16/erlang-iolist.html

    http://prog21.dadgum.com/70.html

Regards,

Paul.

P.S.  Before others (and Joe) shout at me, IOlists are mentioned on
page 230 of Programming Erlang, but only just).


On 7 May 2012 16:19, Bob Ippolito <bob@REDACTED> wrote:
> The advantage of binaries is that they take up significantly less memory per
> character and you can send them to other processes on the same node with no
> copying. Iolists of binaries are also good to use for IO.
>
>
> On Monday, May 7, 2012, Fred Hebert wrote:
>>
>> Cowboy does accept IOLists. They're very rarely going to not be the
>> fastest data structure to handle the concatenation strings to be output, in
>> my experience. I do recommend them for any and all appending and prepending
>> that needs to be done with web servers, files, etc.
>>
>> On Mon May 7 10:48:19 2012, Wes James wrote:
>>
>>
>> On Mon, May 7, 2012 at 8:18 AM, Paul Barry<paul.james.barry@REDACTED>
>> wrote:
>>
>>
>> I take it that doing it that way is "faster" than string manipulation
>> (or is there some other reason for this suggestion)?
>>
>>
>>
>> Based on some discussion I've seen on the list in the past, I believe
>> binary is faster. In my case, I'm using binaries to construct html
>> chunks as I'm using cowboy, but I think cowboy can also use io lists,
>> like Fred mentioned.
>>
>> -wes
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Paul Barry, w: http://paulbarry.itcarlow.ie - e: paul.barry@REDACTED
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.



More information about the erlang-questions mailing list