diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-08-01 10:12:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-01 10:12:54 +0200 |
| commit | eb71c3589a5867c78285ee2e7e7435eb0cb08768 (patch) | |
| tree | 5b1901eb2ff4b0a573194c411a4c6b2bc8545aea /src/rustllvm/RustWrapper.cpp | |
| parent | 67678862388992f5819163be8ba831e2431b36aa (diff) | |
| parent | ca5264826430cb5dab7a3c61394e8e795bbbd851 (diff) | |
| download | rust-eb71c3589a5867c78285ee2e7e7435eb0cb08768.tar.gz rust-eb71c3589a5867c78285ee2e7e7435eb0cb08768.zip | |
Rollup merge of #52859 - ljedrz:smallvec_true_extend, r=Mark-Simulacrum
Use Vec::extend in SmallVec::extend when applicable As calculated in #52738, `Vec::extend` is much faster than `push`ing to it in a loop. We can take advantage of this method in `SmallVec` too - at least in cases when its underlying object is an `AccumulateVec::Heap`. ~~This approach also accidentally improves the `push` loop of the `AccumulateVec::Array` variant, because it doesn't utilize `SmallVec::push` which performs `self.reserve(1)` with every iteration; this is unnecessary, because we're already reserving the whole space we will be needing by performing `self.reserve(iter.size_hint().0)` at the beginning.~~
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
