improve worst-case performance of BTreeSet intersection v2#59078
improve worst-case performance of BTreeSet intersection v2#59078ssomers wants to merge 1 commit intorust-lang:masterfrom ssomers:btreeset_intersection_revisited
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.