diff options
| author | bors <bors@rust-lang.org> | 2024-10-16 04:06:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-16 04:06:14 +0000 |
| commit | 9618da7c9995a673af4841149ba2d1f53b69dd92 (patch) | |
| tree | 16913060a69a93a3fbde12e8dab7f54d5acd60c3 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | 9ce3675b438aae22ef0c6147cde2003a418ab722 (diff) | |
| parent | 8de8f46f789e5e61a0129fd9a7cf0c942a6301d8 (diff) | |
| download | rust-9618da7c9995a673af4841149ba2d1f53b69dd92.tar.gz rust-9618da7c9995a673af4841149ba2d1f53b69dd92.zip | |
Auto merge of #131422 - GnomedDev:smallvec-predicate-obligations, r=compiler-errors
Use `ThinVec` for PredicateObligation storage ~~I noticed while profiling clippy on a project that a large amount of time is being spent allocating `Vec`s for `PredicateObligation`, and the `Vec`s are often quite small. This is an attempt to optimise this by using SmallVec to avoid heap allocations for these common small Vecs.~~ This PR turns all the `Vec<PredicateObligation>` into a single type alias while avoiding referring to `Vec` around it, then swaps the type over to `ThinVec<PredicateObligation>` and fixes the fallout. This also contains an implementation of `ThinVec::extract_if`, copied from `Vec::extract_if` and currently being upstreamed to https://github.com/Gankra/thin-vec/pull/66. This leads to a small (0.2-0.7%) performance gain in the latest perf run.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions
