-
Notifications
You must be signed in to change notification settings - Fork 20.9k
core/vm: hoist jumptable nil-check out of the interpreter loop #32068
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
base: master
Are you sure you want to change the base?
Conversation
2140d2f
to
301d5a8
Compare
stack = newstack() // local stack | ||
callContext = &ScopeContext{ | ||
op OpCode // current opcode | ||
jumpTable *JumpTable = in.table |
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.
I wonder why it's a pointer at all
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.
I guess to avoid 2KB copies on each interpreter creation.
Please post benchstat comparison. |
"op" here is a 100 gas worth of execution. |
apparently there is an already existing VM benchmark in the repo. Will remove the one added here.
|
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.
SGTM, pretty crazy that this has such a big impact in the benchmarks
Deployed on 07/08 for a sanity check |
simple enough. benchmark of a dummy EVM loop shows ~%2 speed up on my machine.