Build Options for maximum performance of SHA256

Martin Bonner Martin.Bonner at entrust.com
Mon Feb 5 12:35:10 UTC 2024


> Date: Mon, 5 Feb 2024 09:48:21 +0100
> From: opensslmailing <mailto:opensslmailing at gmx.de>
> To: mailto:openssl-users at openssl.org
> Subject: Build Options for maximum performance of SHA256 digest
>       calculation
> Message-ID: <mailto:76163372.20240205094821 at gmx.de>
> Content-Type: text/plain; charset=us-ascii

> I want to build openssl for Windows to achieve best possible performance on
> my machine (Core i5 6500) of SHA256 digest calculation for large files in a
> C++ program. What options do I have to use to achieve this?

> P.S. Currently my program calculates about 330 Mibyte/s whereas other programs
> using OpenSSL reach about 400 MiByte/s on the same machine with the same file

I don't think this is really on-topic for this list, but some suggestions for
things to investigate:
- How big is the file?
- How are you reading the file (istream, fopen as text, fopen as binary, read,
  memory map)?
- How are the other programs reading it?
- What platform are you running on? What compiler are you using?
- When you build OpenSSL, are you specifying compiler flags to generate code for
  modern processors only?


Martin Bonner


Any email and files/attachments transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If this message has been sent to you in error, you must not copy, distribute or disclose of the information it contains. Please notify Entrust immediately and delete the message from your system.


More information about the openssl-users mailing list