rust/library/alloc
bors 99d6692f6c Auto merge of #87431 - the8472:array-iter-fold, r=kennytm
implement fold() on array::IntoIter to improve flatten().collect() perf

With #87168 flattening `array::IntoIter`s is now `TrustedLen`, the `FromIterator` implementation for `Vec` has a specialization for `TrustedLen` iterators which uses internal iteration. This implements one of the main internal iteration methods on `array::Into` to optimize the combination of those two features.

This should address the main issue in #87411

```
# old
test vec::bench_flat_map_collect                         ... bench:   2,244,024 ns/iter (+/- 18,903)

# new
test vec::bench_flat_map_collect                         ... bench:     172,863 ns/iter (+/- 2,141)
```
2021-07-27 10:38:41 +00:00
..
benches implement fold() on array::IntoIter to improve flatten().collect() perf 2021-07-24 19:24:11 +02:00
src Auto merge of #85305 - MarcusDunn:master, r=pnkfelix 2021-07-27 05:53:31 +00:00
tests Add test for the fix 2021-07-11 17:47:57 +02:00
Cargo.toml Add support for const operands and options to global_asm! 2021-05-13 22:31:57 +01:00