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

Optimize core::ptr::align_offset (part 1) #68787

Merged
merged 3 commits into from Feb 3, 2020
Merged

Optimize core::ptr::align_offset (part 1) #68787

merged 3 commits into from Feb 3, 2020

Conversation

@amosonn
Copy link
Contributor

amosonn commented Feb 3, 2020

r? @nagisa
See #68616 for main discussion.

amosonn added 3 commits Jan 28, 2020
- When calculating the inverse, it's enough to work `mod a/g` instead
  of `mod a`.
- Stopping condition inside mod_inv can be >= instead of >
- Remove intrinsics::unchecked_rem, we are working modulu powers-of-2 so
we can simply mask
- As explained in the comment inside mod_inv, it is valid to work mod
  `usize::max_value()` right until the end.
@amosonn amosonn requested a review from nagisa Feb 3, 2020
@amosonn amosonn changed the title Patch 1 Optimize core::ptr::align_offset (part 1) Feb 3, 2020
@nagisa

This comment has been minimized.

Copy link
Contributor

nagisa commented Feb 3, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 3, 2020

📌 Commit 22b263a has been approved by nagisa

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 3, 2020
Optimize core::ptr::align_offset (part 1)

r? @nagisa
See rust-lang#68616 for main discussion.
bors added a commit that referenced this pull request Feb 3, 2020
Rollup of 8 pull requests

Successful merges:

 - #68678 (Install robots.txt into rust-docs tarballs)
 - #68711 (Added upper bound of what vecs and boxes can allocate)
 - #68744 (Do not ICE in `type-alias-impl-trait` with save-analysis)
 - #68777 (Clean up E0263 explanation)
 - #68787 (Optimize core::ptr::align_offset (part 1))
 - #68797 (Fix links to types instead of modules)
 - #68798 (Test that `#[track_caller]` as `fn()` respects RT / CTFE equivalence)
 - #68800 (Stabilize `core::iter::once_with()`)

Failed merges:

r? @ghost
@bors bors merged commit 22b263a into rust-lang:master Feb 3, 2020
4 checks passed
4 checks passed
pr Build #20200203.2 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@amosonn amosonn deleted the amosonn:patch-1 branch Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.