Skip to content

Conversation

@phrwlk
Copy link
Contributor

@phrwlk phrwlk commented Oct 30, 2025

This change optimizes crates/anvil/src/eth/backend/executor.rs by removing unnecessary allocations without altering behavior. It moves the transactions vector into Block::new instead of cloning since it is not used afterwards and Block::new already performs the necessary internal cloning for transaction root computation. It also updates build_logs_bloom to accept &[Log] and adjusts the call site to pass &logs, avoiding a separate Vec clone used solely for iteration. Together these changes reduce per-block and per-transaction allocations while maintaining identical semantics.

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me

@zerosnacks zerosnacks added this pull request to the merge queue Oct 30, 2025
Merged via the queue into foundry-rs:master with commit da06b66 Oct 30, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 30, 2025
@rplusq rplusq mentioned this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants