[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Rserpool] Re: Adler-32 Checksum



Thomas Dreibholz writes:
> On Thursday 30 June 2005 17:06, Peter Lei wrote:
> > I'm not sure what your concern is here.  The Internet checksum
> > is just the ones's complement of (one's complement sum + carry).
> > That's two additional steps over a simple XOR sum.
> 
> XOR is computationally cheaper than addition. It works bit-wise and does not 
> need a carry.

Was that meant as a serious comment?  I don't think that sort of
consideration applies to _any_ system built in the past 40 years or
so.

I'd think that choosing a commonly-implemented (and thus likely-to-
be-bug-free and well-supported and well-understood) algorithm would
trump any concern about bit twiddling at this level.

I suspect that most people who deal with TCP/IP already have a handy,
well-tested in_cksum() function available.

-- 
James Carlson, KISS Network                    <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.234W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.497N   Fax +1 781 442 1677

_______________________________________________
rserpool mailing list
rserpool at ietf.org
https://www1.ietf.org/mailman/listinfo/rserpool