-----Original Message----- From: openssl-users <openssl-users-boun...@openssl.org> On Behalf Of Michael Wojcik Sent: Thursday, January 21, 2021 9:28 AM To: openssl-users@openssl.org Subject: RE: OpenSSL 1.1.1g Windows build slow rsa tests
> >From: openssl-users <openssl-users-boun...@openssl.org> On Behalf Of > >Dr Paul Dale > >Sent: Wednesday, 20 January, 2021 19:28 >> >> I'd suggest giving a build without the no-asm option a try. The >> performance difference is usually quite significant. >I agree. It just doesn't explain what Dan's email claims. >> Statis vs dynamic builds wouldn't normally be associated with such a >> large difference. If the difference were routinely this large, nobody >> would use dynamic linking. >In this case it's the static-linked version which is slower. But I'd be >surprised if that's actually the cause. Thank you all for the helpful suggestions. When I removed no-asm and built using nmake in the Developer Command Prompt for Visual Studio 2015, I ended up getting an error "VC-WIN64A X86 conflicts with target x64". From the command prompt I ran cl and saw this "Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86". So I was building for x86? I'm not sure why it built with no-asm, but it did. Once I ran the correct command prompt (I used Visual Studio x64 Native Tools Command Prompt), I saw a huge speed increase. For example, 2048 bits: Doing 2048 bits private rsa's for 10s: 8384 2048 bits private RSA's in 10.02s Doing 2048 bits public rsa's for 10s: 236090 2048 bits public RSA's in 9.98s Previously, I saw: Doing 2048 bits private rsa's for 10s: 409 2048 bits private RSA's in 10.00s Doing 2048 bits public rsa's for 10s: 15663 2048 bits public RSA's in 10.02s For further testing, I added back no-asm and my speed tests were in line with the downloaded openssl binary I was testing with. Doing 2048 bits private rsa's for 10s: 1868 2048 bits private RSA's in 10.00s Doing 2048 bits public rsa's for 10s: 71338 2048 bits public RSA's in 10.02s You can see removing no-asm does make a pretty large speed increase too. In summary, using the correct build tools helps (although I am surprised it built with no-asm). And removing no-asm sped things up.