Out of sync source code

Richard A. O'Keefe ok at hermes.otago.ac.nz
Thu Jan 20 00:21:34 UTC 2000


"Dick" wrote:
	Please consider the cost of adding computing a checksum for a
	multi-megabyte file to the Squeak startup process.

I created a 29MB file, /tmp/BIG, and did

% time sum /tmp/BIG		=> 7u+2s seconds (about 0.31 sec/MB)
% time cksum /tmp/BIG		=> 5u+3s seconds (about 0.28 sec/MB)
% time sum -r /tmp/BIG		=> 8u+2s seconds (about 0.34 sec/MB)

where u = utime, s = stime.  This was on an 84MHz SPARCstation 5,
a real slowpoke compared with more modern machines.

To see if this was repeatable, I catted together enough copies of a
Squeak image to make about 33.5echo  MB

% time sum /tmp/IMG		=> 10u+3s seconds (about 0.39 sec/MB)
% time cksum /tmp/IMG		=>  5u+3s seconds (about 0.24 sec/MB)
% time sum -r /tmp/IMG		=>  9u+3s seconds (about 0.36 sec/MB)

The system time is pretty constant from one to the other; time
resolution is 1 second.  That's basically the overhead for simply reading
the file.  *That* time will be spent reading the image anyway.  So the
actual OVERHEAD for computing the checksum is on the order of 5 seconds
per 30 MB, on a modern machine 5 seconds per 100 MB (50 ms per MB) would
not be an unreasonable expectation.

The Squeak2.6 image that I downloaded onto my PowerMac is 5.5MB;
even on a 120MHz machine checksumming should take no more than 2/3 of a
second.  It currently takes about 8 seconds to start up.

I suspect most people would never notice it.





More information about the Squeak-dev mailing list