Subject: Re: Assembly version of in_cksum
To: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
From: Charles M. Hannum <mycroft@MIT.EDU>
List: port-i386
Date: 07/03/1996 08:52:46
"Michael L. VanLoon -- HeadCandy.com" <michaelv@HeadCandy.com> writes:

> 
> While this is being forwarded about...  My ppp link is hardly
> "high-speed", so I have no personal use for it...
> [...]
> Added files:
> 	sys/arch/i386/i386: in_cksum.s 
> Removed files:
> 	sys/arch/i386/i386: in_cksum.c 
> 
> Log message:
> Assembly version of in_cksum by Dave Richards.  >20% faster in the usual
> cases, up to 62% faster in other cases.

Matt mentioned this to me.  FWIW, I just converted the previous
version (mostly done by me) to assembler, did the obvious things to
eliminate extra register moves, added *one* additional optimization
for large mbufs, and it's once again up to 50% faster than the version
you mention (with common mbuf layouts, and depending on the CPU).
It's also slightly smaller, although larger than my previous version.

Maybe someone will be able to make it even faster.  B-)