Skip to content
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

Avoid some widening operations #308

Merged
merged 2 commits into from
May 11, 2024
Merged

Avoid some widening operations #308

merged 2 commits into from
May 11, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented May 11, 2024

  • The fallback implementations of adc and sbb can avoid widening by mimicking the standard library's implementations of carrying_add and borrowing_sub. (But the intrinsic x86/x86_64 versions are still faster.)
  • The inverse used in Montgomery multiplication doesn't need to be wide, nor signed, so we can drop that and remove SignedDoubleBigDigit altogether.

The intrinsic x86/x86_64 versions are still faster though.
The inverse for `MontyReducer` doesn't need a wider type at all!
@cuviper cuviper linked an issue May 11, 2024 that may be closed by this pull request
@cuviper cuviper enabled auto-merge May 11, 2024 00:35
@cuviper cuviper added this pull request to the merge queue May 11, 2024
Merged via the queue into rust-num:master with commit 71b78bc May 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not turn on LLVM intrinsic dependency by default
1 participant