1
Fork 0
rust/compiler/rustc_data_structures/src
bors 9618da7c99 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.
2024-10-16 04:06:14 +00:00
..
base_n Stabilize the size of incr comp object file names 2024-04-22 10:50:07 -04:00
binary_search_util Remove invariant comments 2023-11-05 17:35:37 -06:00
fingerprint remove redundant imports 2023-12-10 10:56:22 +08:00
flock Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
intern remove redundant imports 2023-12-10 10:56:22 +08:00
obligation_forest Swap PredicateObligation to ThinVec 2024-10-12 15:17:16 +01:00
owned_slice Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
profiling
small_c_str Fix SmallCStr conversion from CStr 2024-02-14 18:40:53 -08:00
snapshot_map Reformat use declarations. 2024-07-29 08:26:52 +10:00
sorted_map Reformat use declarations. 2024-07-29 08:26:52 +10:00
sso Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_hasher Use uplifted rustc-stable-hash crate in rustc_data_structures 2024-07-11 16:51:16 +02:00
sync Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
tagged_ptr Reformat use declarations. 2024-07-29 08:26:52 +10:00
transitive_relation
aligned.rs
atomic_ref.rs
base_n.rs chore: Fix typos in 'compiler' (batch 1) 2024-09-02 07:42:38 +02:00
captures.rs
fingerprint.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
flat_map_in_place.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
flock.rs Use Linux file locking on Redox 2024-06-16 12:56:50 +00:00
frozen.rs
fx.rs rustc_mir_transform: Make DestinationPropagation stable for queries 2024-01-05 20:55:32 +01:00
hashes.rs chore: Fix typos in 'compiler' (batch 1) 2024-09-02 07:42:38 +02:00
intern.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
jobserver.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lib.rs Add ExtractIf for ThinVec 2024-10-12 15:17:03 +01:00
marker.rs rustc_data_structures: Explicitly check for 64-bit atomics support 2024-06-28 10:26:45 +02:00
memmap.rs Issue 122262: MAP_PRIVATE for more reliability on virtualised filesystems. 2024-03-15 18:31:07 -04:00
owned_slice.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
packed.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
profiling.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
sharded.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
small_c_str.rs Fix SmallCStr conversion from CStr 2024-02-14 18:40:53 -08:00
sorted_map.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_hasher.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
stack.rs format 2024-10-01 17:21:56 -04:00
steal.rs Add an internal lint that warns when accessing untracked data 2024-09-03 19:14:19 +02:00
svh.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
sync.rs Use &raw in the compiler 2024-09-26 20:33:26 -07:00
tagged_ptr.rs
temp_dir.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
thinvec.rs Add ExtractIf for ThinVec 2024-10-12 15:17:03 +01:00
transitive_relation.rs Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
unhash.rs Handle clippy cases of rustc::potential_query_instability lint 2024-10-05 07:34:14 +03:00
unord.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
work_queue.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00