From 29072639d6cf38063fea9ff8505c44c5ac4f3b95 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Fri, 30 Jan 2026 10:02:43 -0800 Subject: [PATCH] perf(trie): remove shrink_to_fit calls from SparseSubtrieBuffers::clear (#21630) Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --- crates/trie/sparse-parallel/src/trie.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/crates/trie/sparse-parallel/src/trie.rs b/crates/trie/sparse-parallel/src/trie.rs index a399c6a07b..06adc5035d 100644 --- a/crates/trie/sparse-parallel/src/trie.rs +++ b/crates/trie/sparse-parallel/src/trie.rs @@ -3134,19 +3134,10 @@ impl SparseSubtrieBuffers { /// Clears all buffers. fn clear(&mut self) { self.path_stack.clear(); - self.path_stack.shrink_to_fit(); - self.rlp_node_stack.clear(); - self.rlp_node_stack.shrink_to_fit(); - self.branch_child_buf.clear(); - self.branch_child_buf.shrink_to_fit(); - self.branch_value_stack_buf.clear(); - self.branch_value_stack_buf.shrink_to_fit(); - self.rlp_buf.clear(); - self.rlp_buf.shrink_to_fit(); } }