Auto merge of #137563 - FractalFir:dep_graph_cap, r=nnethercote
Change TaskDeps to start preallocated with 128 capacity This is a tiny change that makes `TaskDeps::read_set` start preallocated with capacity for 128 elements. From local profiling, it looks like `TaskDeps::read_set` is one of the most-often resized hash-sets in `rustc`.
This commit is contained in:
commit
4f52199194
1 changed files with 1 additions and 2 deletions
|
@ -1299,12 +1299,11 @@ impl Default for TaskDeps {
|
|||
#[cfg(debug_assertions)]
|
||||
node: None,
|
||||
reads: EdgesVec::new(),
|
||||
read_set: FxHashSet::default(),
|
||||
read_set: FxHashSet::with_capacity_and_hasher(128, Default::default()),
|
||||
phantom_data: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A data structure that stores Option<DepNodeColor> values as a contiguous
|
||||
// array, using one u32 per entry.
|
||||
struct DepNodeColorMap {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue