-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
BTreeMap: split up range_search into two stages #81094
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
Conversation
|
Just noticed that my fancy description applies to code in a parallel universe, and this one isn't quite as elegant. |
…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`
|
@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. |
|
Splitting off more parts as separate PRs while merge conflicts come in. |
|
☔ The latest upstream changes (presumably #81073) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81853) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #82103) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81937) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@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_searchexpects 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_rangethat 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