-
Notifications
You must be signed in to change notification settings - Fork 288
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
Refactor encode funcs #1399
Refactor encode funcs #1399
Conversation
Clean code Not important Restore jumpdets_analysis.asm Refactor encode_empty_node and encode_branch_node
evm/src/cpu/kernel/interpreter.rs
Outdated
@@ -942,6 +944,18 @@ impl<'a> Interpreter<'a> { | |||
} | |||
self.generation_state.registers.context = context; | |||
} | |||
|
|||
/// Writes the encoding of 0 to position @ |
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.
@ENCODED_EMPTY_NODE_POS
?
Refactor encode_empty_node and encode_branch_node Add constant and store encoded empty node in an other position Remove child segment Clean code Apply suggestions from code review Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com> Remive global label Move encoded empty nodes
127c721
to
a834049
Compare
Sorry, I had to force push when I rebased to main |
Co-authored-by: Linda Guiga <101227802+LindaGuiga@users.noreply.github.com> Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
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.
Two minor comments for my OCD 😃
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
This PR changes how branch and empty nodes are encoded:
It saves ~2500 cycles with add11_yml.