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

evm: opcode benchmarks #3531

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

evm: opcode benchmarks #3531

wants to merge 2 commits into from

Conversation

jochem-brouwer
Copy link
Member

Originally intended for #3529, but this can be used as standalone.

This PR creates a very simple "opcode benchmark". It reads all stack information from stackDelta from EOF. Note: this stack delta only contains opcodes available in EOF, so opcodes as CALL are not in there.

The benchmark simply setups the stack with the right amount of inputs (all zeros), then performs the operation, and then pops any outputs if the opcode has them. Then it jumps back (it loops forever). This is obviously a very naive test, for instance for the ADD opcode it will thus keep performing 0 + 0 the entire time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant