summaryrefslogtreecommitdiffstats
path: root/crypto/threads_win.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-12-23 16:30:36 +0000
committerDmitry Belyavskiy <beldmit@gmail.com>2020-12-30 09:32:14 +0100
commit30af356df487b2dad571be15574b454daf70743c (patch)
tree02cab71ac65683912e1757242abe1e6ffe3d5e97 /crypto/threads_win.c
parentae031148fde2b55238d56dcbe4ac05625382d970 (diff)
Don't call EVP_CIPHER_CTX_block_size() to find the block size
The EVP lib was calling EVP_CIPHER_CTX_block_size(), which in turn calls EVP_CIPHER_block_size() in order to find the block_size in every EVP_EncryptUpdate() call. This adds a surprising amount of overhead when using speed to test aes-128-cbc. Since we're in the EVP lib itself, we can just directly access this value. To test performance I ran the command: openssl speed -evp aes-128-cbc -bytes 16 -seconds 30 For the before and after, I ran this twice and discarded the first result to "warm up" my machine. Before: aes-128-cbc 716949.71k After: aes-128-cbc 742807.11k This represents a performance improvement of about 4% Partially fixes #13407 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13734)
Diffstat (limited to 'crypto/threads_win.c')
0 files changed, 0 insertions, 0 deletions