instant team mailing list archive
-
instant team
-
Mailing list archive
-
Message #00285
Re: Use of SHA1 in signatures.py
I tried it, and calling new('sha1') was twice as fast as calling
sha1() directly (0.8e-6 s per call vs 1.7e-6 s per call!), and running
a hundred updates on the object had the same timing.
--
Martin
2008/9/11 Anders Logg <logg@xxxxxxxxx>:
> From help(hashlib):
>
> Named constructor functions are also available, these are much faster
> than using new():
>
> md5(), sha1(), sha224(), sha256(), sha384(), and sha512()
>
> I suggest using hashlib.sha1 directly.
>
> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIyQ6RTuwUCDsYZdERAlGyAKCEuWFdgRYFwpNbt4lpCejv9DZNZQCfQhjK
> FJoXwMYJNShD1hrH8f9Ck5s=
> =SL+9
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Instant-dev mailing list
> Instant-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/instant-dev
>
>
Follow ups
References