Squeak file stream performance

Michel Tilman mtilman at acm.org
Sat Aug 14 14:17:45 UTC 1999


Hello,

I compared the following (obviously non-optimized) code in Squeak 2.4

    | stream |

    stream := FileStream newFileNamed: 'Bad.txt'.
    17476266 timesRepeat:
         [ stream nextPutAll: 'BAD' ].
    stream close

to its Vw5i counterpart:

    | stream |

    stream := 'Bad.txt' asFilename writeStream.
    17476266 timesRepeat:
         [ stream nextPutAll: 'BAD' ].
    stream close

Time for the Squeak version is 12 min 18 seconds, for VW5i 23 seconds, a
rather large (32 times) performance difference, although the Squeak
#nextPutAll: method builds directly on a primitive. Flushing every character
write in VW hardly slowed it down. The PC is a Pentium III 450 with 256 MB
RAM. Does anyone have any ideas about this difference?

Does anyone have any experience with database acces in Squeak, e.g. how well
the memory manager is suited for dealing with larger pieces of data?

Thanks,

Michel





More information about the Squeak-dev mailing list