-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
improve worst-case performance of BTreeSet intersection v2 #59078
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @scottmcm |
@bors try |
improve worst-case performance of BTreeSet intersection Alternative to [pull request #58577](#58577): back out of attempts to optimize using ranges, more elegant code (I think). The stable public type Intersection changes from struct to enum. If that matters, then perhaps changing the fields like in the other proposal also mattered.
☀️ Try build successful - checks-travis |
It looks like @KodrAus signed off on the other PR? What's the status of this, given that? |
I have no clue. I don't think any of it was actually merged. I guess tweaking it over and over wasn't the intention but I'm learning. And right now, I think this PR is a better version of the best parts of the first one. It doesn't go as far, but I'm not sure it makes sense to optimize for some cases at some cost for the situations where the previous implementation was best: intersection of small sets. In the "real world" case I'm using this for (through https://github.com/ssomers/Bron-Kerbosch/blob/master/rust/bron_kerbosch/src/util.rs), the further optimization in the other PR doesn't make a difference. PS better except for the issue that perhaps Intersection being an enum exposes implementation detail. |
…ited_again, r=KodrAus improve worst-case performance of BTreeSet intersection v3 Variation of [rust-lang#59078](rust-lang#59078) with `Intersection` remaining a struct r? @scottmcm
…ited_again, r=KodrAus improve worst-case performance of BTreeSet intersection v3 Variation of [rust-lang#59078](rust-lang#59078) with `Intersection` remaining a struct r? @scottmcm
Alternative to pull request #58577: back out of attempts to optimize using ranges, more elegant code (I think).
The stable public type Intersection changes from struct to enum. If that matters, then perhaps changing the fields like in the other proposal also mattered.