-
Notifications
You must be signed in to change notification settings - Fork 41
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
perf(levm): add more benchmarks to the suite #1803
Merged
Merged
Conversation
This file contains 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
with hardcoded bytecode for now
Using tx_report.output instead of current_call_frame.output
|
|
3a468fd
to
86343bc
Compare
Benchmark Results ComparisonPR ResultsBenchmark Results: Factorial
Benchmark Results: Factorial - Recursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: ERC20 - Transfer
Benchmark Results: ERC20 - Mint
Benchmark Results: ERC20 - Approval
Main ResultsBenchmark Results: Factorial
Benchmark Results: Fibonacci
|
d58afee
to
c9c6fa7
Compare
c9c6fa7
to
ad8d80b
Compare
fborello-lambda
approved these changes
Jan 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing.
The PR's note says:
I think the best is to merge like this and then change the CI again in main in another small PR?
Yes, i would do a small PR after this one is merged.
Now we run more preparation code for the VM; however without this change it wasn't executing correctly contracts where we call ourselves via STATICCALL or similar.
ilitteri
approved these changes
Jan 29, 2025
ilitteri
approved these changes
Jan 29, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 29, 2025
**Motivation** Since the recently #1803 PR we now have new benchmarks. We need to modify the CI to make the comparison. I couldn't do that in the previous PR because since the new benchmarks were not in main yet, the CI would always fail. **Description** I will fix this in the next benchmark PR so we don't have to create 2 PRs for each new benchmark. <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 -->
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.
Motivation
We need more complex contracts to benchmark our implementation against other VMs.
Description
FactorialRecursive
,ManyHashes
,ERC20Mint
,ERC20Approval
andERC20Transfer
.crates/vm/levm/Makefile
since it had a lot of repetition and hardcoded values, mainly avoid copy-paste mistakes and make it easier to modify.crates/vm/levm/bench/revm_comparison/src/benchmark.rs
file with parameters, instead of two files per benchmark case.crates/vm/levm/bench/revm_comparison/lib.rs:run_with_levm
we now useVM::transact()
instead of directlyVM::execute(callframe)
. This might modify slightly our benchmarks because we now take into accountprepare_execution
, however this fixes the benchmarks not working with contracts that call themselves recursively (likeFibonacciRecursive
)Further Steps
Notes
Right now
ci_bench_levm.yaml
for the jobbenchmark-main
is unchanged, because else it wouldn't pass the CI since the new benchmarks aren't in main. I think the best is to merge like this and then change the CI again in main in another small PR?Closes #1623