Message369715
OpenSSL's SHA-3 implementation is a tiny bit faster than our builtin copy of SHA-3.
builtin SHA-3 with PGO
$ python3 -m timeit -s "from _sha3 import sha3_256; d = b'12345678' * 1000" "sha3_256(d)"
10000 loops, best of 5: 20.3 usec per loop
builtin SHA-3 without PGO
$ ./python -m timeit -s "from _sha3 import sha3_256; d = b'12345678' * 1000" "sha3_256(d)"
10000 loops, best of 5: 21.1 usec per loop
OpenSSL SHA-3
$ ./python -m timeit -s "from _hashlib import openssl_sha3_256 as sha3_256; d = b'12345678' * 1000" "sha3_256(d)"
20000 loops, best of 5: 19.1 usec per loop
OpenSSL's Blake2 implementation is also a tiny bit faster. (b.copy().update() because the _hashlib module doesn't have fast constructor yet)
$ python3 -m timeit -s "from _blake2 import blake2b; b = blake2b(); d = b'12345678' * 1000" "b.copy().update(d)"
50000 loops, best of 5: 9.67 usec per loop
$ python3 -m timeit -s "from _hashlib import new; b = new('blake2b512'); d = b'12345678' * 1000" "b.copy().update(d)"
50000 loops, best of 5: 8.87 usec per loop |
|
Date |
User |
Action |
Args |
2020-05-23 11:21:50 | christian.heimes | set | recipients:
+ christian.heimes, gregory.p.smith, cstratak, miss-islington |
2020-05-23 11:21:50 | christian.heimes | set | messageid: <1590232910.15.0.540748532931.issue37630@roundup.psfhosted.org> |
2020-05-23 11:21:50 | christian.heimes | link | issue37630 messages |
2020-05-23 11:21:50 | christian.heimes | create | |
|