-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
BTreeMap: disentangle Drop implementation from IntoIter #81486
Conversation
bd0f6de
to
0faf35a
Compare
Last commit conforms to #81073, dismisses two |
bd5b605
to
b6012c3
Compare
I wasn't happy with the rather primitive code in
|
b6012c3
to
fd9918e
Compare
☔ The latest upstream changes (presumably #81853) made this pull request unmergeable. Please resolve the merge conflicts. |
fd9918e
to
4230d99
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 4230d999ee1d76ab09380e172dc418f9f925be6b with merge c3d1be590b1ba9ceb83fe3737f5cf2e767f72377... |
☀️ Try build successful - checks-actions |
Queued c3d1be590b1ba9ceb83fe3737f5cf2e767f72377 with parent 0fc6756, future comparison URL. |
Finished benchmarking try commit (c3d1be590b1ba9ceb83fe3737f5cf2e767f72377): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
4230d99
to
3045b75
Compare
Rebased and tweaked a few comments. |
@bors r+ Performance seems largely "noise" I guess, hard to say precisely. Change seems good from sort of "first principles" and I like that it removes the macros, at least partially; that seems like a win. |
📌 Commit 3045b75 has been approved by |
☀️ Test successful - checks-actions |
…r=Mark-Simulacrum BTree: merge the complication introduced by rust-lang#81486 and rust-lang#86031 Also: - Deallocate the last few tree nodes as soon as an `into_iter` iterator steps beyond the end, instead of waiting around for the drop of the iterator (just to share more code). - Symmetric code for backward iteration. - Mark unsafe the methods on dying handles, modelling dying handles after raw pointers: it's the caller's responsibility to use them safely. r? `@Mark-Simulacrum`
No longer require every
BTreeMap
to dig up its last leaf edge before dying. This speeds up theclone_
benchmarks by 25% for normal keys and values (far less for huge values).r? @Mark-Simulacrum