-
Notifications
You must be signed in to change notification settings - Fork 188
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
Benchmarking: k256 falls short to fiat-crypto and crypto-bigint #846
Comments
fiat-crypto
synthesizes field arithmetic, so it's all specialized to the properties of a particular field modulus.
cc @fjarri |
I don't think a whole lot of work has been done on optimizing the scalar field in |
I don't think it is entirely correct to compare |
Aah yes, |
Convert from which form to Montgomery form? |
The other form is "canonical form" and is a normal integer. The |
Thanks. I didn't know about these different forms, would research more. I'll update my benchmarking code and update this issue accordingly, after-which I assume it could be closed. |
I ran some benchmarking, and was really surprised at the results. I published the code so you can see that I haven't made any mistakes.
But results are (full trace is found in the readme file of the repo):
fiat-crypto
field arithmetic is faster (add
: 3.6ns vs 5.2ns,mul
: 22ns vs 28ns) thank256
crypto-bigint::Residue
arithmetic faster (add
: 3.8ns vs 5.2ns,mul
: 27ns vs 28ns) thank256
(but slower thanfiat-crypto
How can this be explained? perhaps there's some error on my side?
Originally posted by @ycscaly in RustCrypto/crypto-bigint#158 (comment)
The text was updated successfully, but these errors were encountered: