Skip to content

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Mar 15, 2021

Inspired by #81312

@rust-highfive
Copy link
Contributor

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2021
@ssomers ssomers marked this pull request as draft March 16, 2021 10:02
@ssomers ssomers force-pushed the btree_clarify_search_comments branch from 5f418d4 to f57a09a Compare March 16, 2021 10:31
@ssomers ssomers changed the title BTree: document order guarantee by searches a little better BTree: clarify order guarantee provided by searches Mar 16, 2021
@ssomers ssomers marked this pull request as ready for review March 16, 2021 10:33
@ssomers ssomers force-pushed the btree_clarify_search_comments branch from f57a09a to 33d22f8 Compare March 17, 2021 19:09
@crlf0710 crlf0710 added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 2, 2021
@crlf0710
Copy link
Member

crlf0710 commented Apr 2, 2021

r? @m-ou-se

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2021
…lap, r=Mark-Simulacrum

BTree: no longer search arrays twice to check Ord

A possible addition to / partial replacement of rust-lang#83147: no longer linearly search the upper bound of a range in the initial portion of the keys we already know are below the lower bound.
- Should be faster: fewer key comparisons at the cost of some instructions dealing with offsets
- Makes code a little more complicated.
- No longer detects ill-defined `Ord` implementations, but that wasn't a publicised feature, and was quite incomplete, and was only done in the `range` and `range_mut` methods.
r? `@Mark-Simulacrum`
@bors bors merged commit 33d22f8 into rust-lang:master Apr 4, 2021
@rustbot rustbot added this to the 1.52.0 milestone Apr 4, 2021
@ssomers ssomers deleted the btree_clarify_search_comments branch April 4, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants