Hi,
can somebody explain me the following result:
[
stream := WriteStream on: String new.
stream nextPutAll: 'something to be put'.
stream nextPutAll: 'something else to be put too'.
] bench. ===> '206796.4407118576 per second.'
.
[
stream := WriteStream on: Array new.
stream nextPutAll: 'something to be put'.
stream nextPutAll: 'something else to be put too'.
] bench. ===> '26177.36452709458 per second.'
Why does streaming over Strings is 10 times faster than streaming over Arrays?
Thank you
--
Damien Cassou