Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2435 +/- ##
=======================================
Coverage 96.57% 96.58%
=======================================
Files 178 181 +3
Lines 21607 21653 +46
Branches 533 533
=======================================
+ Hits 20868 20913 +45
Misses 626 626
- Partials 113 114 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Move the function to `arithmetic` from `limb`. This is step towards moving all arithmetic out of `limb`. Change the signature so that the reduction is done separately instead of in-place. It was already being done separately in `bigint` and it costs very little, if anything, to do the same in the other caller in `ec`. Optimize the implementation to take advantage of the fact that `r` and `a` do not alias each other. To do so, replace `LIMBS_reduce_once` with two separate helper functions, `LIMBS_sub` and `LIMBS_cmov`. As part of doing this, ensure we're not passing any empty slices to the relevant C code. ``` git difftool HEAD^1:src/limb.rs src/arithmetic/limbs/reduce_once.rs ```
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the function to
arithmeticfromlimb. This is step towards moving all arithmetic out oflimb.Change the signature so that the reduction is done separately instead of in-place. It was already being done separately in
bigintand it costs very little, if anything, to do the same in the other caller inec.Optimize the implementation to take advantage of the fact that
randado not alias each other. To do so, replaceLIMBS_reduce_oncewith two separate helper functions,LIMBS_subandLIMBS_cmov.As part of doing this, ensure we're not passing any empty slices to the relevant C code.