about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-22 01:16:29 +0000
committerbors <bors@rust-lang.org>2021-03-22 01:16:29 +0000
commit35385770ae1ea86a911cc44ac43f856831e44b26 (patch)
tree509eb08317fe567c9294f2162699bb310266f52c /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent97663b6690689379aa0493deb494dfe14627c46b (diff)
parent2d8be457434103bfeeea59f1882a15760f2a5c70 (diff)
downloadrust-35385770ae1ea86a911cc44ac43f856831e44b26.tar.gz
rust-35385770ae1ea86a911cc44ac43f856831e44b26.zip
Auto merge of #79846 - the8472:inplace-tra, r=m-ou-se
Use TrustedRandomAccess for in-place iterators where possible

This can speed up in-place iterators containing simple casts and transmutes from `Copy` types to any type of same size. `!Copy` types can't be optimized since `TrustedRandomAccess`  isn't implemented for those iterators.

```
 name                  on.b ns/iter     o1.b ns/iter     diff ns/iter   diff %  speedup
 vec::bench_transmute  20 (40000 MB/s)  12 (66666 MB/s)            -8  -40.00%   x 1.67
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions