rust/src/librustc_data_structures
Pietro Albini eb71c3589a
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.~~
2018-08-01 10:12:54 +02:00
..
2018-07-26 16:33:52 +03:00
2018-07-02 11:40:49 -04:00
2018-07-25 10:25:29 +09:00
2018-07-29 18:04:09 +01:00
2018-07-11 16:08:38 +02:00