BTreeMap: disentangle Drop implementation from IntoIter#81486
BTreeMap: disentangle Drop implementation from IntoIter#81486bors merged 1 commit intorust-lang:masterfrom ssomers:btree_separate_drop
Conversation
|
Last commit conforms to #81073, dismisses two |
|
I wasn't happy with the rather primitive code in |
|
☔ The latest upstream changes (presumably #81853) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@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 |
|
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
BTreeMapto 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