Open
Conversation
A couple years ago the go compiler finally implemented jumptables for switch: https://go-review.googlesource.com/c/go/+/357330/8
Contributor
Author
|
bit off topic, but the Benchmarks in wiki are quite outdated. Despite golang improvements since 1.7 (seen by now only being ~4x slower than upstream lua), python3's performance has greatly improved since then. I reran for lua/luajit/glua/python3 Granted it's a rather synthetic benchmark |
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.
A couple years ago the go compiler finally implemented jumptables for switch:
https://go-review.googlesource.com/c/go/+/357330
In order to avoid function call overhead of
evalInstruction, a mainLoop/mainLoopWithContext are combined for inliningBenchmarks done with: AMD Ryzen 7 7840U w/ Radeon 780M Graphics
before:
with only switch:
with combined main loops:
with evalInstruction inlined & lifting reg assignment out of loop: