Skip to content

Bench with criterion#2295

Merged
rakita merged 7 commits intobluealloy:mainfrom
nemnem7:bench_with_criterion
Mar 25, 2025
Merged

Bench with criterion#2295
rakita merged 7 commits intobluealloy:mainfrom
nemnem7:bench_with_criterion

Conversation

@nemnem7
Copy link
Contributor

@nemnem7 nemnem7 commented Mar 24, 2025

  • Modified the body of functions which use criterion to do benchmark tests.
  • Added sample size field to Cmd struct
  • Renamed measurement_time field on Cmd struct to time
  • Modified evm.rs file

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 24, 2025

CodSpeed Performance Report

Merging #2295 will improve performances by ×3

Comparing nemnem7:bench_with_criterion (59a2ea3) with main (efe528e)

Summary

⚡ 2 improvements
✅ 6 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
analysis 178.3 µs 58.6 µs ×3
transfer 46.3 µs 25.1 µs +84.81%

@nemnem7
Copy link
Contributor Author

nemnem7 commented Mar 24, 2025

@rakita

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few last nits but overall lgtm

@nemnem7
Copy link
Contributor Author

nemnem7 commented Mar 25, 2025

@rakita

@nemnem7
Copy link
Contributor Author

nemnem7 commented Mar 25, 2025

  • Removed the imports which were previously commented out.
  • Added comment which explains relationship and interaction between measurement_time and sample_size fields of Cmd struct
  • Adjusted default warmup time to 0.5s (was previously 0.1s)

@rakita rakita merged commit 6f38322 into bluealloy:main Mar 25, 2025
29 checks passed
@nemnem7 nemnem7 deleted the bench_with_criterion branch March 25, 2025 23:02
@github-actions github-actions bot mentioned this pull request Mar 25, 2025
rakita pushed a commit that referenced this pull request Mar 26, 2025
* temp code preview

* add criterion to benchmarks

* added args to fn run() calls in bins/revme/

* modifed the code inside the benchmark tests

* left only .replay function inside bench_functions and added minor revisions to the rest of the code

* edited comment annotation in burntpix.rs file

* added comments and set different default value for warm_up_time
rakita added a commit that referenced this pull request Mar 26, 2025
* temp

* feat: Add JournalInner

* fix(ci): Still run statetests from eth/tests repo (#2306)

* feat: Add a wrapper for arkworks for EIP196 (#2305)

* add read_scalar, point_add and point_mul into the wrapper

* modify bn128.rs to use new api methods

* preserve previous semantics

* initial commit to add matter-labs wrapper

* feature gate matter-labs impl -- make substrate impl still default

* update revm and precompile cargo.toml file

* use cfg_if

* make bn an optional dependency

* cfg else -> else_if so that there is no silent fallback

* follow same cfg_if pattern as other precompiles

* fix optimism

* add back `self` import

* Push empty commit to trigger CI

* cargo fmt

* clippy fix

* make `bn` the default with revm and revme

* fix typo

* Update crates/revm/Cargo.toml

* Update crates/revm/Cargo.toml

* Update crates/precompile/src/lib.rs

* Update crates/optimism/Cargo.toml

* revert Cargo.toml formatting

* multi:

- remove bn as optional
- if default-features and matter-labs-eip1962 feature is enabled, then we choose matter-labs
- remove conditional configs in other  parts of code since bn is always available

* revert crates/optimism/src/precompiles.rs

* revert crates/optimism/src/evm.rs

* revert unnecessary changes in crates/precompile/src/lib.rs

* revert Cargo.toml changes

* revert automatic Cargo.toml formatting

* revert formatting on secp256k1 in Cargo.toml

* revert c-kzg formatting in Cargo.toml

* revert dev key in Cargo.toml

* revert c-kzg feature in Cargo.toml

* Update crates/precompile/Cargo.toml

* Apply suggestions from code review

* initial commit of arkworks file -- replace matter-labs

* add arkworks depedency

* grep replace matter-labs with arkworks

* make substrate-bn impl optional

* propagate arkworks/std

* add comment for substrate-bn impl

* Update crates/precompile/src/bn128/arkworks.rs

---------

* feat: Add criterion to revme bench command (#2295)

* temp code preview

* add criterion to benchmarks

* added args to fn run() calls in bins/revme/

* modifed the code inside the benchmark tests

* left only .replay function inside bench_functions and added minor revisions to the rest of the code

* edited comment annotation in burntpix.rs file

* added comments and set different default value for warm_up_time

* clear all Journal fields

* doc

* formating change

---------

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: nemnem7 <115541090+nemnem7@users.noreply.github.com>
This was referenced Mar 27, 2025
This was referenced Mar 27, 2025
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.

2 participants