-
Notifications
You must be signed in to change notification settings - Fork 205
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
p521: fiat-constify update #1003
Conversation
Signed-off-by: Arvind Mukund <[email protected]>
Signed-off-by: Arvind Mukund <[email protected]>
Signed-off-by: Arvind Mukund <[email protected]>
Awesome! Looking great.
|
Sweet! I'll modify the local dependents of |
Since you now have a newtype and the code is splatted into the crate, you can define methods on the newtype, which can be If you decide to go that route, it's probably something to stick in the macros in |
Signed-off-by: Arvind Mukund <[email protected]>
Signed-off-by: Arvind Mukund <[email protected]>
Signed-off-by: Arvind Mukund <[email protected]>
Signed-off-by: Arvind Mukund <[email protected]>
Benchmarking resultsfieldfield element operations/mul
time: [75.775 ns 75.850 ns 75.922 ns]
change: [+0.0648% +0.1801% +0.2878%] (p = 0.00 < 0.05)
Change within noise threshold.
field element operations/square
time: [44.344 ns 44.347 ns 44.350 ns]
change: [-0.1067% -0.0814% -0.0597%] (p = 0.00 < 0.05)
Change within noise threshold.
field element operations/invert
time: [25.669 µs 25.670 µs 25.672 µs]
change: [-0.2368% -0.1409% -0.0697%] (p = 0.00 < 0.05)
Change within noise threshold.
field element operations/sqrt
time: [24.540 µs 24.541 µs 24.543 µs]
change: [-7.4990% -7.4626% -7.4337%] (p = 0.00 < 0.05)
Performance has improved. scalarpoint operations/point-scalar mul
time: [860.22 µs 860.82 µs 861.67 µs]
change: [+0.0278% +0.0997% +0.1814%] (p = 0.02 < 0.05)
Change within noise threshold.
scalar operations/sub time: [11.260 ns 11.261 ns 11.261 ns]
change: [-0.0063% +0.0069% +0.0186%] (p = 0.30 > 0.05)
No change in performance detected.
scalar operations/add time: [17.158 ns 17.160 ns 17.162 ns]
change: [-0.0575% -0.0344% -0.0117%] (p = 0.00 < 0.05)
Change within noise threshold.
scalar operations/mul time: [145.15 ns 145.20 ns 145.25 ns]
change: [-0.3466% -0.2725% -0.2113%] (p = 0.00 < 0.05)
Change within noise threshold.
scalar operations/negate
time: [12.664 ns 12.669 ns 12.674 ns]
change: [+0.0797% +0.1884% +0.2810%] (p = 0.00 < 0.05)
Change within noise threshold.
scalar operations/invert
time: [119.16 µs 119.19 µs 119.23 µs]
change: [-0.5475% -0.4806% -0.4174%] (p = 0.00 < 0.05)
Change within noise threshold. Tested on:
|
-7% on |
Interesting that the tests pass on 1.65 but the benchmarks don't. I think they got rid of |
My desktop was just being noisy (:
I could add a TODO to clean it up and add the precomputed results for the inversions instead. Alternatively just ungate the |
Signed-off-by: Arvind Mukund <[email protected]>
@MasterAwesome maybe try building the benches on |
`const_eval_limit` that was removed at some point isn't in MSRV toolchain and fails builds Signed-off-by: Arvind Mukund <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're ready to start making breaking changes, so I'm going to go ahead and merge this.
This reverts commit 71a9bce. This is complicating bumping all of the rest of the crates to use `elliptic-curve` v0.14.0-pre.0. So, this temporarily reverts this change so we can upgrade the rest of the crates and cut an initial `primeorder` v0.14.0-pre release first. After that, we can revert-the-revert.
This reverts commit 71a9bce. This is complicating bumping all of the rest of the crates to use `elliptic-curve` v0.14.0-pre.0. So, this temporarily reverts this change so we can upgrade the rest of the crates and cut an initial `primeorder` v0.14.0-pre release first. After that, we can revert-the-revert.
This reverts commit 26be150. Now that we've completed the `elliptic-curve` v0.14.0-pre upgrade, we can restore the fiat-crypto upgrade. This commit takes a slightly different approach and puts the macro implementation for the newest version of `fiat-crypto` into the new `primefield` crate which was added in #1013. The goal will be to update all of the crates and then remove the old macros from `primeorder` entirely.
This reverts commit 26be150. Now that we've completed the `elliptic-curve` v0.14.0-pre upgrade, we can restore the fiat-crypto upgrade. This commit takes a slightly different approach and puts the macro implementation for the newest version of `fiat-crypto` into the new `primefield` crate which was added in #1013. The goal will be to update all of the crates and then remove the old macros from `primeorder` entirely.
This reverts commit 26be150. Now that we've completed the `elliptic-curve` v0.14.0-pre upgrade, we can restore the fiat-crypto upgrade. This commit takes a slightly different approach and puts the macro implementation for the newest version of `fiat-crypto` into the new `primefield` crate which was added in #1013. The goal will be to update all of the crates and then remove the old macros from `primeorder` entirely.
Implementation for the
fiat-constify
update @ RustCrypto/utils#992TODOs
Remove dep on
primeorder
for other crates.A nicer way to do
.0.0
unfortunately withoutconst
deref this is probably not easily doable.Benchmarks? Maybe the codegen improves ever so slightly because of the copies that LLVM can't emit.
CC: @tarcieri