From e100fd4d52c2e0f7a02c8237da5a65ea3e8c6d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kostrubiec?= <fractalfirdev@gmail.com> Date: Thu, 27 Feb 2025 16:05:01 +0100 Subject: [PATCH] Changed the dependency graph to start preallocated with 128 capacity --- compiler/rustc_query_system/src/dep_graph/graph.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 5e6bee1dbd5..6ece01c211b 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -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 {