Author christian.heimes
Recipients christian.heimes, gregory.p.smith, miss-islington
Date 2022-01-08.12:24:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641644681.81.0.838067457266.issue40479@roundup.psfhosted.org>
In-reply-to
Content
Simple benchmark with openssl-3.0.0-5.el9.x86_64

With custom EVP_MD cache:
$ ./python -m timeit -s "from hashlib import md5" "md5(b'12345678', usedforsecurity=False).digest()"500000 loops, best of 5: 520 nsec per loop
$ ./python -m timeit -s "from hashlib import sha512" "sha512(b'12345678', usedforsecurity=False).digest()"
500000 loops, best of 5: 730 nsec per loop

Without EVP_MD cache:
$ ./python -m timeit -s "from hashlib import md5" "md5(b'', usedforsecurity=False).digest()"
500000 loops, best of 5: 807 nsec per loop
$ ./python -m timeit -s "from hashlib import sha512" "sha512(b'12345678', usedforsecurity=False).digest()"
200000 loops, best of 5: 1.03 usec per loop
History
Date User Action Args
2022-01-08 12:24:41christian.heimessetrecipients: + christian.heimes, gregory.p.smith, miss-islington
2022-01-08 12:24:41christian.heimessetmessageid: <1641644681.81.0.838067457266.issue40479@roundup.psfhosted.org>
2022-01-08 12:24:41christian.heimeslinkissue40479 messages
2022-01-08 12:24:41christian.heimescreate