mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
perf(trie): fix allocation hot paths with capacity hints and buffer reuse (#21466)
Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: yongkangc <chiayongkang@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
9382a4c713
commit
e7d4a05e36
@@ -105,10 +105,10 @@ impl<TC, HC, VE: LeafValueEncoder> ProofCalculator<TC, HC, VE> {
|
||||
hashed_cursor,
|
||||
branch_stack: Vec::<_>::with_capacity(64),
|
||||
branch_path: Nibbles::new(),
|
||||
child_stack: Vec::<_>::new(),
|
||||
child_stack: Vec::<_>::with_capacity(64),
|
||||
cached_branch_stack: Vec::<_>::with_capacity(64),
|
||||
retained_proofs: Vec::<_>::new(),
|
||||
rlp_nodes_bufs: Vec::<_>::new(),
|
||||
retained_proofs: Vec::<_>::with_capacity(32),
|
||||
rlp_nodes_bufs: Vec::<_>::with_capacity(8),
|
||||
rlp_encode_buf: Vec::<_>::with_capacity(RLP_ENCODE_BUF_SIZE),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user