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

Add benchmark for bytecode execution #3437

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

JacekGlen
Copy link

This PR adds an EVM benchmark that can be run for individual bytecodes.

The main motivation for the tool is to be used in gas-cost-estimator project, but its purpose goes beyond it. You can learn more about the project from this short presentation, or visit the wiki Stage 4 Scope.

The benchmark implementation differs slightly as it does not add to the existing Benchmark.Suite. Instead, it creates a new Benchmark object for each run and handles async resolution. This was proven to produce more consistent results.

@acolytec3
Copy link
Contributor

Will try and get to a review of this PR this week!

packages/vm/benchmarks/run.ts Outdated Show resolved Hide resolved
packages/vm/benchmarks/bytecode.ts Outdated Show resolved Hide resolved
packages/vm/benchmarks/bytecode.ts Outdated Show resolved Hide resolved
@holgerd77
Copy link
Member

Hi there,
sorry that this takes such a somewhat solid amount of time to review here and comment, everyone on the team is pretty busy with relatively heavy implementational stuff regarding EIPs and the like.

Generally this is pretty interesting work though, we are really eager to continue to have the tooling around benchmarking improved!

@jochem-brouwer recently also worked on some benchmarking tooling regarding the performance of bytecodes for the VM - see https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/DEVELOPER.md#benchmarks - and maybe a reason for a slow start here is also that we are (at least: I am) not really sure how these two tools relate and if we are producing some redundant tooling here or not.

Can you have some word on this? That would help for sure on the process! 🙏 🙂

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.

6 participants