Thanks for the explanation, some quick and dirty buffering makes a huge difference:
[ FileStream fileNamed: '/tmp/numbers.txt' do: [ :fileStream | 1000 timesRepeat: [ fileStream nextPutAll: (String streamContents: [ :stream | 100 timesRepeat: [ stream print: 100 atRandom; space ] ]) ] ] ] timeToRun. 159
Still, the asymmetry is a bit strange. Can't the side effects be dealt with using #flush ?
There are several stream libraries (for example XTreams) that can easily support write buffering without the need to care about compatibility.
Yeah, although the Smalltalk Collection and Stream classes were better than everything else 20, 30 years ago, lots of things have changed and there is lots of competition. The fact that these classes are so nice to use seem to have prevented necessary improvements.
Yes time to move.
I think I might file this as a Pharo issue.
Sven