-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Improve ptr_rotate
performance, tests, and benches
#61937
Conversation
r? @rkruppe (rust_highfive has picked a reviewer for you, use r? to override) |
Sorry, it seems like I can't get around to reviewing this quickly. Maybe @scottmcm can take a look? |
Re-assigning to @scottmcm but I suspect they might also be unavailable. cc @rust-lang/libs |
☔ The latest upstream changes (presumably #60340) made this pull request unmergeable. Please resolve the merge conflicts. |
Is this the right way to resolve a merge conflict? All I did was click the in browser resolve button and fix the problem. The in browser commits look fine, but my local rust branch is freaking out and
What is going on here? I want to squash the conflict fix into the original commit, without needing to redownload a rust clone. |
I think rust prefer rebasing feature branches on top of master in case of merge conflict. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I downloaded a fresh depth 1 rust master and used that for this PR. It looks like everything is going well, except that my Github website rust master page is "1 commit ahead, 59 commits behind" for some reason. |
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.
Sorry for the delay here. This approach seems good, though I couldn't repro any material perf difference on my old SandyBridge.
Please respond to the comments I left (with code changes or with prose) and I'll take another look.
Note that some of the benchmarks are behaving weirdly. I figured out that if I run the |
Hey! This is a ping from triage, we would like to know if you @scottmcm could give us a few minutes to share your thoughts on last response sent by @AaronKutch . Thanks. @rustbot modify labels to -S-waiting-on-author, +S-waiting-on-review |
I made some changes to the commit. |
Thanks, looks like it should be good now! @bors r+ |
📌 Commit ad7fdb6 has been approved by |
Improve `ptr_rotate` performance, tests, and benches The corresponding issue is rust-lang#61784. I am not actually sure if miri can handle the test, but I can change the commit if necessary.
⌛ Testing commit ad7fdb6 with merge 186011a0de31be69649a1fe9f66fed93125b3ca4... |
@bors retry rolled up. |
Improve `ptr_rotate` performance, tests, and benches The corresponding issue is #61784. I am not actually sure if miri can handle the test, but I can change the commit if necessary.
☀️ Test successful - checks-azure |
#[test] | ||
fn brute_force_rotate_test_1() { | ||
// `ptr_rotate` covers so many kinds of pointer usage, that this is just a good test for | ||
// pointers in general. This uses a `[usize; 4]` to hit all algorithms without overwhelming miri |
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.
Thanks you so much for keeping Miri in mind here. <3
@@ -1130,6 +1130,44 @@ fn test_rotate_right() { | |||
} | |||
} | |||
|
|||
#[test] | |||
#[cfg(not(miri))] |
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.
These should come with a comment explaining why. I will add a Miri is too slow
in one of the Miri-adjustment PRs I have in flight anyway.
The corresponding issue is #61784. I am not actually sure if miri can handle the test, but I can change the commit if necessary.