diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-01 00:27:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-01 00:27:18 +0200 |
| commit | 718ba0d23bc13cd987acbb1b2286552eeee88a1d (patch) | |
| tree | 362ee678f2b2043b594c1e330ae3c223c271c7ec /src/libstd/sys/unix/stack_overflow.rs | |
| parent | a5b09d35473615e7142f5570f5c5fad0caf68bd2 (diff) | |
| parent | 0405db3a341a094f421a762a15c14b392fec94f8 (diff) | |
| download | rust-718ba0d23bc13cd987acbb1b2286552eeee88a1d.tar.gz rust-718ba0d23bc13cd987acbb1b2286552eeee88a1d.zip | |
Rollup merge of #68770 - ssomers:btree_drain_filter, r=Amanieu
BTreeMap/BTreeSet: implement drain_filter Provide an implementation of drain_filter for BTreeMap and BTreeSet. Should be optimal when the predicate picks only elements in leaf nodes with at least MIN_LEN remaining elements, which is a common case, at least when draining only a fraction of the map/set, and also when the predicate picks elements stored in internal nodes where the right subtree can easily let go of a replacement element. The first commit adds benchmarks with an external, naive implementation. to compare how much this claimed optimality-in-some-cases is actually worth.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
