Nov. 10, 2012
7:18 p.m.
Maybe pre-allocate the right size: ByteArray new: byteArray size * 16 streamContents: ... Nicolas 2012/11/10 Mariano Martinez Peck <marianopeck@gmail.com>:
Hi guys:
|byteArray| byteArray := (ByteArray new: 1024*1024). [ ByteArray streamContents: [:s | 16 timesRepeat: [ s nextPutAll:byteArray ] ] ] timeToRun
Gives me around 1 second. Isn't that too much? or is it normal/expected? Anything I could improve?
Thanks,
-- Mariano http://marianopeck.wordpress.com