-
Notifications
You must be signed in to change notification settings - Fork 70
perf(levm): use specialized PUSH1 and PUSH2 implementations #3262
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
Merged
Conversation
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
Lines of code reportTotal lines added: Detailed view
|
Benchmark Results ComparisonPR ResultsBenchmark Results: Factorial
Benchmark Results: Factorial - Recursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: BubbleSort
Benchmark Results: ERC20 - Transfer
Benchmark Results: ERC20 - Mint
Benchmark Results: ERC20 - Approval
Main ResultsBenchmark Results: Factorial
Benchmark Results: Factorial - Recursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: BubbleSort
Benchmark Results: ERC20 - Transfer
Benchmark Results: ERC20 - Mint
Benchmark Results: ERC20 - Approval
|
Oppen
approved these changes
Jun 23, 2025
Arkenan
approved these changes
Jun 23, 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.
Approved with a comment
Benchmark Block Execution Results Comparison Against Main
|
JereSalo
reviewed
Jun 23, 2025
JereSalo
approved these changes
Jun 23, 2025
Co-authored-by: Jeremías Salomón <[email protected]>
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
According to stats from @azteca1998 PUSH2 and PUSH1 are widely used:
Furthermore i keep seeing
U256::from_big_endian
taking quite some time on samply so I made specialized PUSH1 and PUSH2 implementations that avoid that, also using fixed size arrays.Benchmarks:
Hoodi 11k:
main 9m10.471s
pr 8m25.933s
Description
Closes #issue_number
Benchmark Results Comparison
Benchmark Results: Factorial
levm_Factorial_pr
levm_Factorial
levm_FactorialRecursive_pr
levm_FactorialRecursive
levm_Fibonacci_pr
levm_Fibonacci
levm_ManyHashes_pr
levm_ManyHashes
levm_BubbleSort_pr
levm_BubbleSort
levm_ERC20Transfer_pr
levm_ERC20Transfer
levm_ERC20Mint_pr
levm_ERC20Mint
levm_ERC20Approval_pr
levm_ERC20Approval
According to the samply this makes op_push nearly negligible (from 30% to 0%)