-
Notifications
You must be signed in to change notification settings - Fork 75
Replace ConstChoice with ctutils::Choice
#1035
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1035 +/- ##
==========================================
- Coverage 79.23% 79.13% -0.10%
==========================================
Files 164 165 +1
Lines 17707 17616 -91
==========================================
- Hits 14030 13941 -89
+ Misses 3677 3675 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fb13ecd to
9869e41
Compare
Depends on RustCrypto/utils#1266 Extracts all of the `const fn` constructor and predication/selection methods used by `crypto-bigint` into the `ctutils` crate, allowing the `ConstChoice` type to be removed and replaced by `ctutils::Choice`.
9869e41 to
275cca2
Compare
ConstChoice with ctutils::ChoiceConstChoice with ctutils::Choice
|
Benchmark-wise there are several things down in the 3-5% range which seems like noise (also several things up in a similar range), but I'll highlight some weird ones with bigger deltas and then double check if they're reproducible: Boxed Montgomery arithmetic/lincomb_vartime, BoxedUint*BoxedUint+BoxedUint*BoxedUint
time: [17.844 µs 17.950 µs 18.091 µs]
change: [+32.845% +34.706% +37.077%] (p = 0.00 < 0.05)
Performance has regressed.Here's one where the performance impact was allegedly only for one limb size: wrapping ops/div, I2048/I1024, full size
time: [2.1789 µs 2.1979 µs 2.2236 µs]
change: [+8.4198% +15.979% +25.465%] (p = 0.00 < 0.05)
Performance has regressed.
Found 18 outliers among 100 measurements (18.00%)
6 (6.00%) high mild
12 (12.00%) high severe
wrapping ops/div, I4096/I2048, full size
time: [6.4609 µs 6.4945 µs 6.5413 µs]
change: [+0.4732% +1.6890% +2.8631%] (p = 0.00 < 0.05)
Change within noise threshold.This is the worst offender: modular ops/invert_mod2k_vartime, U256
time: [16.349 ns 16.684 ns 17.046 ns]
change: [+79.583% +96.132% +110.35%] (p = 0.00 < 0.05)
Performance has regressed. |
|
Upon looking at these cases again, I'm not worried about any of them in particular.
|
Depends on RustCrypto/utils#1266
Extracts all of the
const fnconstructor and predication/selection methods used bycrypto-bigintinto thectutilscrate, allowing theConstChoicetype to be removed and replaced byctutils::Choice.