Skip to content

std: minor simplification to sync::deque. #14378

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

Merged
merged 1 commit into from
May 24, 2014

Conversation

huonw
Copy link
Member

@huonw huonw commented May 23, 2014

Might as well remove the duplication/forget call.

@huonw
Copy link
Member Author

huonw commented May 23, 2014

r? @alexcrichton

ptr::copy_nonoverlapping_memory(buf.elem(t) as *mut T,
self.elem(t),
(b - t) as uint);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this one I may prefer to keep the loop. I'm hoping to keep this code as close as possible to the original code in the chase-lev paper to make it easy to see the parallels.

That being said, if you've seen some good performance wins from this change, a comment saying what the psudocode is would probably be sufficient.

@alexcrichton
Copy link
Member

You have quite the eagle eye for an improvement like this! Thanks!

@huonw
Copy link
Member Author

huonw commented May 24, 2014

Updated, it's even more pointless now! \o/

(I actually found this experimenting with a tool for finding potentially-invalid & -> &mut and * to *mut casts; clearly this patch doesn't address that at all though... :P )

bors added a commit that referenced this pull request May 24, 2014
Might as well remove the duplication/`forget` call.
@bors bors closed this May 24, 2014
@bors bors merged commit 9a8379d into rust-lang:master May 24, 2014
@huonw huonw deleted the deque-adjustments branch June 27, 2014 06:47
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2023
internal: Bump chalk

This release fixes a problem around GATs (rust-lang/chalk#790). While a regression test is added in chalk's own test suite, I also added one in ours so that we can catch regressions when we move away from chalk.

Fixes rust-lang#14164
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.

3 participants