I have to clarify here that my intention was never to compete in any way with the other algorithms out there. The BSD checksum is a well-known, and pretty weak (16 bits) checksum. The goal behind bsum was only to obtain a checksum tool that would run on my 8086 fast enough for me to not get frustrated, and just good enough to be reasonably sure that the files I just copied from a diskette and then over network-through- parallel-port didn't get corrupted in the process.
Mateusz On Mon, 10 Apr 2017 09:48:41 -0700, Ralf Quint wrote: > On 4/10/2017 6:36 AM, Mateusz Viste wrote: >> On Mon, 10 Apr 2017 00:56:17 -0500, Rugxulo wrote: >>> It would be interesting to see some benchmark numbers for that (for >>> various specific tools, 8086, 386, etc). >> Just for the fun of it, I did some quick measures on my 386SX PC, >> computing various checksums of a 2 MiB file. Results below. >> >> BSUM (by Mateusz Viste) : 6.0s (100%) >> CRC32 (by Joe Forster) : 8.5s (70%) >> CRC32 (by Colin Plumb) : 26.7s (22%) >> MD5 (by Colin Plumb) : 52.9s (11%) >> SHA1 (by Colin Plumb) : 85.7s (7%) >> >> BSUM is the fastest, which is no surprise since the algorithm is >> extremely simple (4 CPU instructions). The CRC32 computation by Joe >> Forster is surprisingly fast as well. It's 30% slower than bsum and the >> binary is 4x times larger (and I suppose the memory usage is also much >> higher) but that's still quite impressive for a 32-bit checksum. > Well, most of all, it's kind of comparing apples and oranges. Those > benchmark tests mean nothing if you don't compare them with the number > of possible collisions you get for each of them. > Though that doesn't mean that there aren't use cases where "simple does > it"... >>> Splurge on the memory, give it 32 kb or so. It'll "probably" be faster >>> with a bigger buffer. > Nope, won't do a thing. Didn't do much good "back in the days" to use > anything over 16KB and it is even less relevant on modern hard drives > with MBs of cache. Or SSDs... > > Ralf ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user