performance note sha1 vs md5 in python

Andrew Bennetts andrew at canonical.com
Mon Aug 6 06:01:25 BST 2007


Robert Collins wrote:
> On Mon, 2007-08-06 at 13:57 +1000, Martin Pool wrote:
> > Those are interesting rules-of-thumb to keep in mind.
> > 
> > If we're going to use md5 then we could even use md4 and be faster
> > still, though that would require providing our own C implementation.
> 
> It appears to be in Crypto.Hash - how available is that?

IIRC it's a dependency of paramiko, so fairly commonly available I think.

However Crypto.Hash.MD4 seems to be *slower* than Crypto.Hash.MD5 on my system,
almost as slow as the standard sha1 module.  (I'm using Robert's timeit line to
measure).  So unless Crypto.Hash.MD4 gets faster, we may as well stick with md5.

-Andrew.




More information about the bazaar mailing list