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

feat: Optimize EvmGasManager further #35

Conversation

0xVolosnikov
Copy link

@0xVolosnikov 0xVolosnikov commented Sep 25, 2024

What ❔

  1. We can remove popEVMFrame function since we are using transient storage
  2. Manual return in assembly block is cheaper for some reason

This pull request changes the structure of transient storage in EvmGasManager, so it will require small chang in the compiler tester.

Observed benchmark result:

╔═╡ Size (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╗
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                                 NaN ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter M3B3 ╞═╣
║ Best                                8.849 ║
║ Worst                               0.000 ║
║ Total                               1.672 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╣
║ Best                                1.275 ║
║ Worst                               0.000 ║
║ Total                               0.632 ║

╠═╡ Ergs/gas (-%) ╞═╡ EVMInterpreter M3B3 ╞═╣
║ BALANCE                             1.639 ║
║ EXTCODESIZE                         0.736 ║
║ EXTCODECOPY                         0.723 ║
║ EXTCODEHASH                         0.559 ║
║ SLOAD                               0.749 ║
║ SSTORE                              1.467 ║
║ CALL                                1.315 ║
║ STATICCALL                          1.339 ║
║ DELEGATECALL                        1.316 ║
║ CREATE                              0.458 ║
║ CREATE2                             0.507 ║
╚═══════════════════════════════════════════╝

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@0xVolosnikov 0xVolosnikov deleted the evm-vv-optimize-gasmanager branch September 27, 2024 08:48
gianbelinche pushed a commit that referenced this pull request Dec 30, 2024
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