Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Optimized EVM Configuration and Precompiles Handling Update main.rs #13780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xminds
Copy link

@0xminds 0xminds commented Jan 12, 2025

I’ve made several improvements to enhance performance and reduce memory usage:

  • Made MyEvmConfig::new a const fn for compile-time evaluation.
  • Used Arc for precompiles to avoid unnecessary cloning.
  • Added #[inline] to my_precompile to reduce function call overhead.
  • Avoided redundant cloning of MyEvmConfig in build_evm and spawn_payload_service.
  • Passed references instead of values where possible to minimize copying.
  • Applied the builder pattern for ChainSpec to ensure efficient construction.

thanks!

@0xminds 0xminds requested a review from gakonst as a code owner January 12, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant