Squeak crash upon full GC

sqrmax at cvtci.com.ar sqrmax at cvtci.com.ar
Mon Jan 19 23:36:57 UTC 1998


Hi.

>I don't think that this would slow down things too much. Would be great if
>somebody would add some CRC checking to Squeak.

I already have a CRC32 checker coded entirely in Smalltalk... big problem
with it is that it crunched 18kb per second in Visual Smalltalk. Definitely
too slow to check the image when saving or so. At that time I thought it was so
slow because it was using LargeIntegers (that crc is 32 bits long) instead
of SmallIntegers, wasting a lot of time. I also have the assembler version
(quite portable, less that a dozen lines), which can be embebbed in a DLL or
primitive in C. At that time, the assembler version was able to crunch about
10mb of data per second... but I'm not so sure about that figure. I'm sure it
was able to crunch 6mb of data per second, but I also remember that I optimized
it some later.

There below is the code of the CRC32 class appended. There are two details
about it. First, it was thought to be fed with BitStreams, a bit oriented
counterpart of Stream. However, it can be easily adapted for Streams (the
#nextByte selector should be replaced with #next). The second 
insignificant detail
is that it uses the selector #shr:, which can be translated to #>>. Overall,
only two selectors have to be changed and those two methods appear only in
one selector, #codeFor:.

Andres.


Content-Type: application/octet-stream; name="Crc32.st"
Content-Disposition: attachment; Filename="Crc32.st"

Attachment converted: Cog:Crc32.st (????/----) (0000AB53)





More information about the Squeak-dev mailing list