-
Notifications
You must be signed in to change notification settings - Fork 616
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
Rework analysis #89
Rework analysis #89
Conversation
Gave this a try, seems to be slower somehow:
Not entirely sure why it's that much slower - maybe it's because I now need to do a |
Fun time optimizing :) |
Could we do the following:
|
@onbjerg I made additional change, and tested it a litlle better on some random data. Can you compare it again? |
Bytecode format needs to be implemented to address this in a proper way. Introduce pub struct Bytecode {
bytes: Bytes, //or vec
bytes_size: usize, // for analysis some bytecode gets padded in that sense having standalone size field is needed.
info: BytecodeInfo,
}
pub enum BytecodeInfo {
Default
Analysed {
jump_table: Vec<_>,
} change this: revm/crates/revm/src/db/traits.rs Line 14 in eb3282d
and insides of AccountInfo: revm/crates/revm/src/db/traits.rs Line 12 in eb3282d
to contains Bytecode and make all necesary changes where needed.
|
Can you rebase real quick? 🙏 |
rebased |
Sorry for the delay, I was really busy yesterday 😬 Here's the benchmark with your patch applied:
And without:
🤔 |
@onbjerg as the last try I will merge two-loop and check if it helps, maybe localization of a loop helps with speed idk, it is really hard to optimize and maybe test data is not the best representation, either way i want this merged so that we can start working on bytecode format that should be the proper solution for fuzzing contract problem. |
In general we're supportive of any kind of change in this neighborhood, let us know how we can be most helpful to keeping the ball rolling. |
@onbjerg try this for the last time, i had a small fix here. I tried other option but it was not great, i intend to merge it as it is now. |
Lil Web3 (top is this branch, bottom is latest nightly)
Solmate (top is this branch, bottom is nightly)
Feel free to merge, I don't think there's much to gain here in terms of perf unfortunately 😞 |
@onbjerg can you run this? I guess it should be a little bit faster than the previous code, but not by a lot.