diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-26 13:57:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-26 13:57:35 -0700 |
| commit | dfbba65786279b5f73cbf26bff4f6d984cb77105 (patch) | |
| tree | a6d9d80ce2d47b0e91d5d6b590c95fc87e7d3667 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 92af945256913dbec2c679a06e154469d60a0d7e (diff) | |
| parent | 42062a58026cdb245e3eb365af726f2d9f4946af (diff) | |
| download | rust-dfbba65786279b5f73cbf26bff4f6d984cb77105.tar.gz rust-dfbba65786279b5f73cbf26bff4f6d984cb77105.zip | |
Rollup merge of #73627 - ssomers:btree_iter_min_max, r=Mark-Simulacrum
Shortcuts for min/max on double-ended BTreeMap/BTreeSet iterators Closes #59947: a performance tweak that might benefit some. Optimizes `min` and `max ` on all btree double-ended iterators that do not drop, i.e. the iterators created by: - `BTreeMap::iter` - `BTreeMap::iter_mut` - `BTreeMap::keys` and `BTreeSet::iter` - `BTreeMap::range` and `BTreeSet::range` - `BTreeMap::range_mut` Also in these (currently) single-ended iterators, but obviously for `min` only: - `BTreeSet::difference` - `BTreeSet::intersection` - `BTreeSet::symmetric_difference` - `BTreeSet::union` Did not do this in iterators created by `into_iter` to preserve drop order, as outlined in #62316. Did not do this in iterators created by `drain_filter`, possibly to preserve drop order, possibly to preserve predicate invocation, mostly to not have to think about it too hard (I guess maybe it wouldn't be a change for `min`, which is the only shortcut possible in this single-ended iterator).
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
