mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 07:17:56 -05:00
perf: prealloc vec (#20721)
Co-authored-by: weixie.cui <weixie.cui@okg.com>
This commit is contained in:
@@ -680,7 +680,7 @@ impl<TX: DbTx + 'static, N: NodeTypesForProvider> DatabaseProvider<TX, N> {
|
||||
.zip(headers)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let mut inputs = Vec::new();
|
||||
let mut inputs = Vec::with_capacity(present_headers.len());
|
||||
for (tx_range, header) in &present_headers {
|
||||
let transactions = if tx_range.is_empty() {
|
||||
Vec::new()
|
||||
|
||||
Reference in New Issue
Block a user