-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Assembly backend #69
Assembly backend #69
Conversation
…ensure early clobber constraints for Clang
We are now 18% faster than MCL on the base field Fp for BLS12-381:
For elliptic curve arithmetic, we are competitive for
Note that BLST with Jacobian coordinates and without endomorphism acceleration (and a size 5 window method) is only slightly slower status-im/nim-blst#1 |
This adds an inline assembly backend to Constantine, using the ADCX/ADOX and MULX instructions
Closes #39
Benchmarks
Field arithmetic
GCC
Clang
Assembly (GCC compiler)
On field multiplication, inline assembly with MULX/ADCX/ADOX instructions is 2.2x faster than GCC and 1.6x faster than Clang
Elliptic G1 Arithmetic
GCC
Clang
Assembly
On scalar multiplication (signing and public key derivation from private key)
Inline assembly is 1.9x faster than GCC and 1.36x faster than Clang
Elliptic G2 Arithmetic
GCC
Clang
Assembly
On scalar multiplication (signing and public key derivation from private key)
Inline assembly is 1.71x faster than GCC and 1.21x faster than Clang