core/vm: hoist jumptable nil-check out of the interpreter loop#32068
Merged
MariusVanDerWijden merged 2 commits intoethereum:masterfrom Jul 7, 2025
Merged
core/vm: hoist jumptable nil-check out of the interpreter loop#32068MariusVanDerWijden merged 2 commits intoethereum:masterfrom
MariusVanDerWijden merged 2 commits intoethereum:masterfrom
Conversation
2140d2f to
301d5a8
Compare
fjl
reviewed
Jun 20, 2025
| stack = newstack() // local stack | ||
| callContext = &ScopeContext{ | ||
| op OpCode // current opcode | ||
| jumpTable *JumpTable = in.table |
Contributor
There was a problem hiding this comment.
I wonder why it's a pointer at all
Member
Author
There was a problem hiding this comment.
I guess to avoid 2KB copies on each interpreter creation.
Contributor
|
Please post benchstat comparison. |
Member
Author
"op" here is a 100 gas worth of execution. |
Member
Author
|
apparently there is an already existing VM benchmark in the repo. Will remove the one added here. |
MariusVanDerWijden
approved these changes
Jun 26, 2025
Member
MariusVanDerWijden
left a comment
There was a problem hiding this comment.
SGTM, pretty crazy that this has such a big impact in the benchmarks
Member
|
Deployed on 07/08 for a sanity check |
Member
howjmay
pushed a commit
to iotaledger/go-ethereum
that referenced
this pull request
Aug 27, 2025
Moves the jumptable nil check our of the interpreter loop. Benchmarks show a 2-10% improvement.
gballet
pushed a commit
to gballet/go-ethereum
that referenced
this pull request
Sep 11, 2025
Moves the jumptable nil check our of the interpreter loop. Benchmarks show a 2-10% improvement.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Apr 20, 2026
…thereum#32068 Refactor the EVM interpreter to clarify and optimize jump table access. This improves code readability and may slightly enhance performance. No logic is changed.
25 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


simple enough. benchmark of a dummy EVM loop shows ~%2 speed up on my machine.