diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-05-13 15:47:19 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-05-13 15:47:19 +1000 |
| commit | 5a0ac0552e05c079f252482cfcdaab3c4b39d614 (patch) | |
| tree | f1934fa541d5024abc18455c1190b5599eedaab3 /src/rustllvm/RustWrapper.cpp | |
| parent | 99cb9ccb9ca2067ad6e60508e3d52da77396b2f1 (diff) | |
| download | rust-5a0ac0552e05c079f252482cfcdaab3c4b39d614.tar.gz rust-5a0ac0552e05c079f252482cfcdaab3c4b39d614.zip | |
Use simpler impls for some `Iterator` methods for slices.
The default implementations of several `Iterator` methods use `fold` or `try_fold`, which works, but is overkill for slices and bloats the amount of LLVM IR generated and consequently hurts compile times. This commit adds the simple, obvious implementations for `for_each`, `all`, `any`, `find`, `find_map`, and simplifies the existing implementations for `position` and `rposition`. These changes reduce compile times significantly on some benchmarks.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
