chore: add criterion benchmark for evm build#2319
Merged
rakita merged 2 commits intobluealloy:mainfrom Mar 27, 2025
Merged
Conversation
CodSpeed Performance ReportMerging #2319 will not alter performanceComparing Summary
Benchmarks breakdown
|
Contributor
Author
|
hi @rakita, this PR is ready for review whenever you get a chance |
rakita
reviewed
Mar 27, 2025
|
|
||
| criterion.bench_function("evm_build", |b| { | ||
| b.iter(|| { | ||
| let _ = evm.replay().unwrap(); |
Member
There was a problem hiding this comment.
Suggested change
| let _ = evm.replay().unwrap(); | |
| let _ = Context::mainnet().build_mainnet(); |
Buildering of EVM should be here, not a replay.
Contributor
Author
There was a problem hiding this comment.
gotcha! updated to
revm/bins/revme/src/cmd/bench/evm_build.rs
Lines 4 to 9 in e537c96
rakita
reviewed
Mar 27, 2025
bins/revme/src/cmd/bench.rs
Outdated
| BenchName::Burntpix => "burntpix", | ||
| BenchName::Snailtracer => "snailtracer", | ||
| BenchName::Transfer => "transfer", | ||
| BenchName::EvmBuild => "evm_build", |
Member
There was a problem hiding this comment.
Suggested change
| BenchName::EvmBuild => "evm_build", | |
| BenchName::EvmBuild => "evm-build", |
For outside names using dash is better.
Contributor
Author
There was a problem hiding this comment.
great point @rakita, updated to:
revm/bins/revme/src/cmd/bench.rs
Line 33 in e537c96
agreed that cargo bench --package revme -- evm-build does look cleaner
rakita
approved these changes
Mar 27, 2025
This was referenced Mar 27, 2025
Closed
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
evm.replay()Note:
build_mainnetstep was left out of the benchmark as to focus on time spent to initialize instructions. Let me know if the intention was to include thebuild_mainnetinto the benchmark as well, and I'll happily add it 🤙