-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance vs openssl #7
Comments
I've been pushing this off for a little time now, but it would require some ASM optimizations: https://github.com/randombit/botan/blob/master/src/lib/math/mp/mp_x86_64/mp_asmi.h Perf gives me the following hot spots: I'll try and merge a fix for this soon |
I think LDC is going to be needed here. I'll invest some time on compiling with that instead. |
Yep, I would also not bother much with dmd on this and it would be nice to have some numbers from LDC or GDC. |
As soon as 2.067 is supported in LDC the plan was to add support. I can't use I'm guessing the optimizations from LLVM will close the gap on this benchmark, dmd has a lot of known codegen missing features and 46x is reasonable given the complexity of these algorithms and the opportunities that other compilers can use. |
I added an openssl engine that pipes all Big number operations through OpenSSL, and also added LDC support, and it's still 5-6x slower for RS256 down from 46x. I'm going to improve it towards the point where it pipes public key operations directly through the high-level openssl functions like |
I decided to put this through |
Out of curiosity I tried simple benchmark of JWTD library (https://github.com/chalucha/jwtd/tree/benchmark/benchmark)
With dmd-2.068 it resulted in:
dub -c openssl -b release
dub -c botan -b release
JWT None is not using openssl neither botan, so it's the same.
There is a huge difference (48x) with RS256.
I know that DMD is bad for any benchmarks, but unfortunatelly it does not build for me with any of:
GDC (Gentoo 4.8.4 p1.6, pie-0.6.1) 4.8.4
LDC - the LLVM D compiler (0.15.1) based on DMD v2.066.1 and LLVM 3.6.0
The text was updated successfully, but these errors were encountered: