BTreeMap: avoid slices even more#76790
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 18, 2020
ssomers:btree_slice_slasher_returns
Merged
BTreeMap: avoid slices even more#76790bors merged 1 commit intorust-lang:masterfrom ssomers:btree_slice_slasher_returns
bors merged 1 commit intorust-lang:masterfrom
ssomers:btree_slice_slasher_returns
Conversation
Contributor
Author
|
The btree benchmarks of mutable behaviour rely heavily on |
Member
|
I think I recall seeing this pattern and being worried about it, so this definitely looks good to me. @bors r+ rollup=never (perf effects not unlikely) |
Collaborator
|
📌 Commit 378b643 has been approved by |
Collaborator
|
⌛ Testing commit 378b643 with merge 9dfeaa9c374c596c91380f6aa857262d23169fb0... |
Collaborator
|
💥 Test timed out |
Member
|
@bors retry |
Collaborator
|
⌛ Testing commit 378b643 with merge 999503af5648bb816ae73899f12ee59ae8563280... |
Collaborator
|
💔 Test failed - checks-actions |
Contributor
Author
|
More timeouts, if you ask me. |
Member
|
@bors retry |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions, checks-azure |
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.
Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and
get_unchecked-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case.Also, the previous code doesn't seem fair game to me, using
get_uncheckedto reach beyond the end of a slice. Although the local functionslice_insertalso does that.r? @Mark-Simulacrum