-
Notifications
You must be signed in to change notification settings - Fork 11
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
evmrs: add benchmarks #821
Conversation
ab7adbe
to
1fba6ce
Compare
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.
Unfortunately, it is still not clear why we need so many benchmark functions.
Can you write an example of the use of the main function in benchmarks/src/main.rs
I find difficult to justify different entry points to the program.
We need two entry points because with criterion be get statistics about the benchmarks (in particular accurate timing data), but criterion also has some overhead. |
1fba6ce
to
7d27bbc
Compare
You could have multiple files but as long as they all use criterion that does not make too much sense because you can already filter the tests within one test binary. The only thing you would gain is that they are compiled as two separate executables. But they would both depend on |
7d27bbc
to
330a29b
Compare
I renamed the file to |
330a29b
to
b87d344
Compare
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.
👍
This PR adds the
benchmarks
which contains benchmarks (currently onlyffi_overhead
) for calling from Rust via FFI into evmrs.The benchmarks can be used in two ways:
cargo bench --package benchmarks --profile profiling [--features <feature1>,<feature2>,...]
cargo build --package benchmarks --profile profiling [--features <feature1>,<feature2>,...]
then use
./target/profiling/benchmarks
with the profiler of your choice