[Pharo-dev] Efficient string concatenation - proposed new
avalloud at smalltalk.comcastbiz.net
Sun Nov 17 15:47:10 EST 2013
The details really don't fit in an email, however the 2nd volume of my
Fundamentals book already has an analysis of this issue and hence my
On 11/17/13 8:45 , Stéphane Ducasse wrote:
> this one is surprising to me
>> [ 'foo', 'bar', 'baz', 'foobar' ] bench. '2,030,000 per second.'
>> [ '' join: #( 'foo' 'bar' 'baz' 'foobar' ) ] bench. '665,000 per second.'
>> [ String streamContents: [ :out | out nextPutAll: 'foo'; nextPutAll:
>> 'bar'; nextPutAll: 'baz'; nextPutAll: 'foobar' ] ] bench. '1,580,000
>> per second.'
More information about the Pharo-dev