Skip to content

Commit 15dbaaa

Browse files
committed
Auto merge of #59626 - nnethercote:DepGraph-1.02x, r=<try>
Reduce the `DepNode` pre-allocation ratio. A code size of increase of 15% is overly generous. 2% is more realistic. This change reduces peak memory size by 20+ MiB on some workloads. r? @Zoxc
2 parents f694222 + 6c9867d commit 15dbaaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/dep_graph/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ impl CurrentDepGraph {
993993
// Pre-allocate the dep node structures. We over-allocate a little so
994994
// that we hopefully don't have to re-allocate during this compilation
995995
// session.
996-
let new_node_count_estimate = (prev_graph_node_count * 115) / 100;
996+
let new_node_count_estimate = (prev_graph_node_count * 102) / 100;
997997

998998
CurrentDepGraph {
999999
data: IndexVec::with_capacity(new_node_count_estimate),

0 commit comments

Comments
 (0)