[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1193110799.5132.48.camel@localhost>
Date: Mon, 22 Oct 2007 20:39:59 -0700
From: Joe Perches <joe@...ches.com>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] - trivial - Improve appletalk checksum calculation
On Mon, 2007-10-22 at 20:30 -0700, Stephen Hemminger wrote:
> > Corrected fast code is:
> >
> > while (len--) {
> > sum += *data++;
> > sum <<= 1;
> > sum = (((sum & 0x10000) >> 16) + sum) & 0xffff;
> > }
> >
> > At least it is correct on the standalone random data test, and the
> > new code is 30% faster for the cached memory case (13.7 clks/byte vs 18
> > clks/byte).
> Your code looks different...
Both are 16 bit rotate lefts.
Which looks clearer?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists