-
Notifications
You must be signed in to change notification settings - Fork 463
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
Optimize EvmStack #5364
Optimize EvmStack #5364
Conversation
These errors from this change? 🤔 |
Withdraw many accounts (nethermind) - this test is unstable for sure. |
@benaadams Nope. They are just flaky. |
} | ||
} | ||
|
||
public void PushSignedInt256(in Int256.Int256 value) | ||
{ | ||
PushUInt256((UInt256)value); | ||
// tail call into UInt256 |
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.
QQ: Can you elaborate what you mean by "tail call" here? Does .net have some specific optimication in this case?
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.
No stack to clean up; return type and parameters match; so in the asm these method just turns into a single jump to the other methods
; Method Nethermind.Evm.EvmStack:PushSignedInt256(byref):this
G_M000_IG01:
G_M000_IG02:
FF25D23F1400 tail.jmp [Nethermind.Evm.EvmStack:PushUInt256(byref):this]
; Total bytes of code: 6
; Method Nethermind.Evm.EvmStack:PopSignedInt256(byref):this
G_M000_IG01:
G_M000_IG02:
FF2532401400 tail.jmp [Nethermind.Evm.EvmStack:PopUInt256(byref):this]
; Total bytes of code: 6
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.
Code looks fine, hive consensus tests are green, if engine tests would pass as well (or we will have same false-positive fails from master) I will feel comfortable with merging it
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?