[gambit-list] Speed improvement of lib/digest.scm
Marc Feeley
feeley at iro.umontreal.ca
Thu Feb 19 17:07:06 EST 2009
On 19-Feb-09, at 4:57 PM, Marc Feeley wrote:
> On my 2GHz Mac Book Pro:
>
> For MD5: 0.06 seconds per MB.
> For SHA-1: 0.13 seconds per MB.
>
> That's still about 3 times slower than the "md5" utility on my
> machine, but still not too bad for bit-bashing code entirely written
> in Scheme.
By the way this slowdown is due to the 16-bit algorithms which are
used to perform the computations without overflowing the fixnums. The
C version probably does 32-bit operations, which is at least a factor
of 2 faster, and probably more when shifts are involved.
Marc
More information about the Gambit-list
mailing list