about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-27 10:38:41 +0000
committerbors <bors@rust-lang.org>2021-07-27 10:38:41 +0000
commit99d6692f6c1cebd6c56a67eb21f6aae26c12a145 (patch)
tree57e6df70c3e510b0d103d5d54429f99711333e44 /compiler/rustc_codegen_llvm/src
parent998cfe5aad7c21eb19a4bca50f05a13354706970 (diff)
parent2276c5e3d76591561e28fed760984e75c46bc407 (diff)
downloadrust-99d6692f6c1cebd6c56a67eb21f6aae26c12a145.tar.gz
rust-99d6692f6c1cebd6c56a67eb21f6aae26c12a145.zip
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)
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions