Andres Valloud performed some benchmarking in the past and his conclusion
was that there was a threshold higher than expected when the streamed
concatenation was faster and memory savvier. This was years ago, and of
course I don't remember such threshold.

However from the code aesthetics I use simple concatenation when I know
beforehand there will be two or three semantically equivalent strings to be
joined and choose streams when there is an uncertain lenght concatenation
(most of the times involving appending while iterating).

Not to mention implementations where the stream is passed as an argument,
which in my experience are easier to factor.
El mar 10, 2015 8:06 PM, "Ben Coman" <b...@openinworld.com> escribió:

> There are a few things floating around the web saying that it is faster
> using a stream for concatenation, but its been shown a while back to be
> "not necessarily" true.  It depends on the use case so you should profile -
> if its that important.
> cheers -ben
>
> On Wed, Mar 11, 2015 at 2:09 AM, sergio_101 <sergio....@gmail.com> wrote:
>
>>
>> it seems that in more cases than not, i find that developers use a stream
>> when concatenating some text strings.
>>
>> I am wondering if this is a smalltalk thing, or is there a real speed
>> benefit when using streams in this way.
>>
>> Thanks!
>>
>>
>

Reply via email to