BTreeSet: avoid intermediate sorting when collecting sorted iterators#97868
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
LGTM @bors r+ rollup=never |
|
📌 Commit 49ccb75 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (be16c61): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
As pointed out by droundy, an obvious optimization is to skip the first step introduced by #88448 (creation of a vector and sorting) and it's easy to do so for btree's own iterators. Also, exploit
fromin the examples.