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

chore: simplify some generics #2032

Merged
merged 2 commits into from
Jan 28, 2025
Merged

chore: simplify some generics #2032

merged 2 commits into from
Jan 28, 2025

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Jan 28, 2025

Adds default generics for EvmError, ResultAndState, ExecutionResult.

Removes CTX generic from InspectEvm and InspectCommitEvm as it's unused.

Removes Spec: Into<SpecId> bound from CfgEnv struct definition

Copy link

codspeed-hq bot commented Jan 28, 2025

CodSpeed Performance Report

Merging #2032 will improve performances by 8.81%

Comparing klkvr/simplify-generics (6757e59) with main (4c77354)

Summary

⚡ 2 improvements
✅ 6 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
analysis 275.3 µs 263.3 µs +4.55%
transfer 144.8 µs 133.1 µs +8.81%

@@ -22,7 +22,7 @@ use revm::{
};
use std::vec::Vec;

pub trait InspectEvm<CTX, INTR: InterpreterTypes>: ExecuteEvm {
pub trait InspectEvm<INTR: InterpreterTypes>: ExecuteEvm {
Copy link
Member

Choose a reason for hiding this comment

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

Awesome! Didn't even notice

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.

lgtm

@rakita rakita merged commit 6e98049 into main Jan 28, 2025
28 checks passed
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