On Fri, Dec 08, 2000 at 04:30:58PM -0500, Tom Lane wrote:
> Bruce Guenter <[EMAIL PROTECTED]> writes:
> >> Are you really saying MD5 was faster than CRC-32?
> > Yes. I expect it's because the operations used in MD5 are easily
> > parallelized, and operate on blocks of 64-bytes at a time, while the CRC
> > is mostly non-parallelizable, uses a table lookup, and operates on
> > single bytes.
> What MD5 implementation did you use?
I used the GPL'ed implementation written by Ulrich Drepper in 1995. The
code from OpenSSL looks identical in terms of the operations performed.
> The one I have handy (the original
> RSA reference version) sure looks like it's more computation per byte
> than a CRC.
The algorithm itself does use more computation per byte. However, the
algorithm works on blocks of 64 bytes at a time. As well, the
operations should be easily pipelined. On the other hand, the CRC code
is largely serial, and highly dependant on a table lookup operation.
--
Bruce Guenter <[EMAIL PROTECTED]> http://em.ca/~bruceg/
PGP signature