-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: split up range_search into two stages #81094
Conversation
Just noticed that my fancy description applies to code in a parallel universe, and this one isn't quite as elegant. |
d3aee77
to
b793c0e
Compare
…Simulacrum BTreeMap: convert search functions to methods And further tweak the signature of `search_linear`, in preparation of a better rust-lang#81094. r? `@Mark-Simulacrum`
bb63d07
to
ec0ba4a
Compare
@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review |
☔ The latest upstream changes (presumably #81169) made this pull request unmergeable. Please resolve the merge conflicts. |
b601803
to
4ccf0f7
Compare
Splitting off more parts as separate PRs while merge conflicts come in. |
4ccf0f7
to
769e245
Compare
c739e02
to
43ec3f9
Compare
☔ The latest upstream changes (presumably #81073) made this pull request unmergeable. Please resolve the merge conflicts. |
43ec3f9
to
a5d623e
Compare
a5d623e
to
8d76f5c
Compare
☔ The latest upstream changes (presumably #81853) made this pull request unmergeable. Please resolve the merge conflicts. |
8d76f5c
to
5687130
Compare
5687130
to
23f83a8
Compare
e619ead
to
34978ef
Compare
☔ The latest upstream changes (presumably #82103) made this pull request unmergeable. Please resolve the merge conflicts. |
287ded3
to
f5e205c
Compare
☔ The latest upstream changes (presumably #81937) made this pull request unmergeable. Please resolve the merge conflicts. |
f5e205c
to
deebb63
Compare
@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review |
This looks good to me, thanks. @bors r+ rollup=never |
📌 Commit deebb63 has been approved by |
☀️ Test successful - checks-actions |
range_search
expects the caller to pass the same root twice and starts searching a node for both bounds of a range. It's not very clear that in the early iterations, it searches twice in the same node. This PR splits that search up in an initialfind_leaf_edges_spanning_range
that postpones aliasing until the last second, and a second phase for continuing the search for the range in the each subtree independently (find_lower_bound_edge
&find_upper_bound_edge
), which greatly helps for use in #81075. It also moves those functions over to the search module.r? @Mark-Simulacrum