On Thu, Apr 28, 2011 at 02:09:00AM +0000, Alistair G. Crooks wrote:
> Module Name: othersrc
> Committed By: agc
> Date: Thu Apr 28 02:09:00 UTC 2011
>
> Update of /cvsroot/othersrc/external/bsd/crc
> In directory ivanova.netbsd.org:/tmp/cvs-serv7562
>
> Log Message:
> initial import of some routines to perform CRC calculations:
I've not looked at these routines :-) but I suspect they do byte or
nibble table lookups.
For CRC16 (hdlc etc) there is a short sequence of shifts and xors
that will update the crc for a new byte.
On superscalar architectures with barrel shifters this is almost
certainly faster than the table lookup versions (even when the
table is in the cache).
IIRC it is 3 clocks slower on non-superscaler with zero wait state memory.
David
--
David Laight: david%l8s.co.uk@localhost